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.2.2-cp37-abi3-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 7e59966487f500c274288601b7dd6f1fe055726d0beff931d62efb7d1fc1d5ba |
|
MD5 | 6c0019e6800d9654c55f493dbbdf95ee |
|
BLAKE2b-256 | 08eb418afd0f4ca5e307552aad8431b15a3b4f6f29abaefeac153f77acfffab4 |
Hashes for py_horned_owl-0.2.2-cp37-abi3-manylinux_2_34_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | ae56a4875d44e70666a7583b74bbc9c5e711794ac9c571f7a4a5c3ffe8a0da10 |
|
MD5 | 0345c67d29c104c72fc2083c7901fee5 |
|
BLAKE2b-256 | e0246d1b56975d24e93844263ccad9a04ee79de6f96d54f0a8615d88168e85c6 |
Hashes for py_horned_owl-0.2.2-cp37-abi3-macosx_10_7_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 5573446c6c9ede50d7ccf2aebc57e5457281e4242f070dd42724a8181001fc62 |
|
MD5 | 182a9c7fa821cc81c6a5d3dd234225a3 |
|
BLAKE2b-256 | 077f4e31aea68c08da7ec2f03a6a4cc0075dd16afa2a955f0c8ee24dbfb8c76e |