Metadata-Version: 2.4
Name: py-whelk
Version: 0.4.0
Classifier: Programming Language :: Rust
Classifier: Programming Language :: Python :: Implementation :: CPython
Classifier: Programming Language :: Python :: Implementation :: PyPy
Requires-Dist: cffi
Requires-Dist: py-horned-owl>=1.4.0
License-File: COPYING
License-File: COPYING.lesser
Summary: Wrapper arround whelk-rs for integration with py-horned-owl
Author-email: Björn Gehrke <bjoern.gehrke+pywhelk@uzh.ch>
License-Expression: LGPL-3.0-or-later
Requires-Python: >=3.10
Description-Content-Type: text/markdown; charset=UTF-8; variant=GFM

# py-whelk
A wrapper around [whelk-rs](https://github.com/INCATools/whelk-rs) to use the reasoner in Python using [py-horned-owl](https://github.com/ontology-tools/py-horned-owl/).

## Usage
```python
from pyhornedowl import open_ontology
import pywhelk

ontology = open_ontology("path/to/ontology.owl")
reasoner = pywhelk.create_reasoner()

# Use the reasoner to infer axioms
inferred_axioms = reasoner.infer(ontology)

# Use the reasoner to classify an ontology 
classified_ontology = reasoner.classify(ontology)

# Consistency checking is not supported at the moment
reasoner.consistency(ontology) # ValueError: NotImplemented
```

## Installation
Build the shared library with `cargo build --release` and copy the resulting .dll or .so files to the `py-whelk` directory. Then, install the Python package with `pip install .`:

```bash
make
pip install .
```
