No project description provided
Project description
py-horned-owl
An experimental bridge from horned-owl to python using PyO3.
Installation
Published version
To install the published library:
pip install py_horned_owl
From sources
To build locally from sources, you will need Rust, PyO3 and Maturin.
Check out this repository:
git clone https://github.com/jannahastings/py-horned-owl/
In the directory py-horned-owl, create and activate a virtual Python environment:
virtualenv py-horned-owl
source bin/activate
Then you can get maturin to build the library and install it into the virtual Python environment with:
maturin develop
Usage
The library supports loading ontologies from .owl
(RDF-XML) and .owx
(OWL-XML) files via horned-owl's parsing functionality. ROBOT can transform ontologies that are in other OWL flavours into one of these formats using robot convert
.
Example of simple usage:
import pyhornedowl
ontoname = "family.owx"
onto = pyhornedowl.open_ontology(ontoname)
print (f"Loaded ontology has {len(onto.get_classes())} classes.")
print (f"Loaded ontology has {len(onto.get_axioms())} axioms.")
for c in onto.get_classes():
print(onto.get_axioms_for_iri(c))
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distributions
Built Distributions
Hashes for py_horned_owl-0.3.0rc1-cp37-abi3-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 7f53d1a715e2c6ded7c79c77df1838cb60c95d75741482c90261daf3b0e768c8 |
|
MD5 | 37c8953245ce5215aa6d0ea1fdc0e017 |
|
BLAKE2b-256 | 39b97d5b387aa59c582ddf614729bdebda89085d6668d6c93e4f3903ef30fb95 |
Hashes for py_horned_owl-0.3.0rc1-cp37-abi3-manylinux_2_34_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | fc02db6deb4b4b22d899c1eacfec8bc50840f43527c780cf10e7216cae348de7 |
|
MD5 | 51125ed990a71c59a2d9c480c118ad45 |
|
BLAKE2b-256 | 76cd524de9a37c7154d75c3543eca9190c5ed6459238d7108a213f75bd96ab34 |
Hashes for py_horned_owl-0.3.0rc1-cp37-abi3-macosx_11_0_arm64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | bdc396700057f0d9f2e2a11b253e6c26cb84058d74e3c69ea9a6c951e5bcefcc |
|
MD5 | 02525fd608f0da98693bee35cc93390a |
|
BLAKE2b-256 | f9e8f0c7ae179820c87a35a441b584fdedc7316dd51f9f9fc013d3a4865033e3 |
Hashes for py_horned_owl-0.3.0rc1-cp37-abi3-macosx_10_12_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | b8524d2b7567fd2f41b5a27de806c4f62e75217d2ef02cfb07ea4bd89f2e9372 |
|
MD5 | 82edccf609e57d37e5791f64ada47928 |
|
BLAKE2b-256 | 02c62af459dadae5f642eb592851b21c1004d75ff6c1abffb4ddde426c908634 |