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, which is currently only available for python 3.8.x on MacOS and Linux:
pip install py_horned_owl
From sources
To build locally from sources, you will need Rust, PyO3 and Maturin.
First check out the associated Python-compatible version of horned-owl:
git clone https://github.com/jannahastings/horned-owl
Then 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
Currently the library only supports loading ontologies from .owx
(OWL-XML) files. Some test files in this format are available in the owl-xml horned-owl folder. Alternatively, ROBOT can transform ontologies into this format 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.2.0-pp37-pypy37_pp73-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_12_x86_64.manylinux2010_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | b6604b75abd8fc754aa81c098a0b177435b6a781f41c7aae008374648a3ebffc |
|
MD5 | 2f38250b4179b5f35f897e405ea74459 |
|
BLAKE2b-256 | e7cf5ca4193efff5d248fcab2bfe7728d0efdec4dd9221b3229a3d5b953e6753 |
Hashes for py_horned_owl-0.2.0-cp310-cp310-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_12_x86_64.manylinux2010_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | f7e6e0ab933fe057b28b5c101e47bb5d9448b69107c92fa51a6c56f2640fdddd |
|
MD5 | 5c5c0d6b8241778a807a7e98a8231a99 |
|
BLAKE2b-256 | 0ecdbc2eb8506edd9152a29bb4bac0f04cd8435e4595c0a04776244510924220 |
Hashes for py_horned_owl-0.2.0-cp310-cp310-macosx_10_7_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 99a03f4cf6a2c767047e72503ec2a61462347dda53562b33ab78b3a404c6d9c4 |
|
MD5 | d368d0a534a6a428d3ebd6880c503be2 |
|
BLAKE2b-256 | cc7ee3bb517f30f794dff10407d722d9b813a7d1eb5c8cea5ff4e5fbb71de6b7 |
Hashes for py_horned_owl-0.2.0-cp39-cp39-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_12_x86_64.manylinux2010_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 36a5f0262632ecf64c197013a27c01ddeff559a077c2c15687f61f0edf54ea0a |
|
MD5 | 90a5542ef7127cce9be24a0770c5cfaa |
|
BLAKE2b-256 | 4d4297ac8ab4d5e46401f2152e23b5d5f46a7dbc49bfb57d1b7d8d9a5086dd66 |
Hashes for py_horned_owl-0.2.0-cp38-cp38-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_12_x86_64.manylinux2010_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 919fd996f016575abd09db45594980ca43ff373bb7ef72bcf396f79ec9fc7438 |
|
MD5 | 92ed8c0b9fe5937ab508e3b5c1021c78 |
|
BLAKE2b-256 | 28fec42873c31c3be3156aebfee281ec200e2d082c61845a1067cc21472ad13d |
Hashes for py_horned_owl-0.2.0-cp38-cp38-macosx_10_7_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 7780dcce7052b0397cfced0d962c25e45b670e0c759e6179c01fccfc3ea1c215 |
|
MD5 | 486aae4a721599d858cdf19fd5979f07 |
|
BLAKE2b-256 | f2255482a543350c18c16432c7d024a50f15aa48122295800903717642e17825 |
Hashes for py_horned_owl-0.2.0-cp37-cp37m-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_12_x86_64.manylinux2010_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 4b84b9ba3964d9082493860c0aabfa82de60bb95ed3a81305c916948407b5de4 |
|
MD5 | e326d54e26fb151250c6f2b2eb79de09 |
|
BLAKE2b-256 | 51032e8701743713e8a5f39c0391b87343dff0e43af8716665ed737ab4a4faf2 |
Hashes for py_horned_owl-0.2.0-cp37-abi3-macosx_10_7_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | f40fe8c6cc3cba97487d6271d740d6ac14b3bda4bc60622231b1b99e8cd0a683 |
|
MD5 | 5aaca345a95d7444a5e84d75f216b533 |
|
BLAKE2b-256 | e75988eab73023473697d085d9b7c03270135b3d6a5d25349e904e8f51093547 |
Hashes for py_horned_owl-0.2.0-cp36-cp36m-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_12_x86_64.manylinux2010_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 00ed45f5380b70b77a89840503658df77799ac5b8fd22006dcb0816dda903890 |
|
MD5 | 0c2297019e732d54a4dae8895946d30a |
|
BLAKE2b-256 | ce32aa445a7f4c2e79a4d2d452b01221fbe81fc60097f609a3e0fabaf16f7c3a |
Hashes for py_horned_owl-0.2.0-cp36-cp36m-macosx_10_7_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 246d474fab2f0ad61857997eb4abb676028f108c98960b158b6af57daf4f1725 |
|
MD5 | da36823bf11b4610e8eb27cca8562b5b |
|
BLAKE2b-256 | 80e71a7206c0d178cca4fc08b0ddd79e98c089b72dd0407ed56cb17fad64966d |