Skip to main content

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))


For more information please visit the documentation.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

py_horned_owl-0.3.2.tar.gz (157.4 kB view hashes)

Uploaded Source

Built Distributions

py_horned_owl-0.3.2-cp37-abi3-win_amd64.whl (1.5 MB view hashes)

Uploaded CPython 3.7+ Windows x86-64

py_horned_owl-0.3.2-cp37-abi3-win32.whl (1.3 MB view hashes)

Uploaded CPython 3.7+ Windows x86

py_horned_owl-0.3.2-cp37-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (2.7 MB view hashes)

Uploaded CPython 3.7+ manylinux: glibc 2.17+ x86-64

py_horned_owl-0.3.2-cp37-abi3-manylinux_2_17_s390x.manylinux2014_s390x.whl (3.1 MB view hashes)

Uploaded CPython 3.7+ manylinux: glibc 2.17+ s390x

py_horned_owl-0.3.2-cp37-abi3-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl (2.8 MB view hashes)

Uploaded CPython 3.7+ manylinux: glibc 2.17+ ppc64le

py_horned_owl-0.3.2-cp37-abi3-manylinux_2_17_armv7l.manylinux2014_armv7l.whl (2.6 MB view hashes)

Uploaded CPython 3.7+ manylinux: glibc 2.17+ ARMv7l

py_horned_owl-0.3.2-cp37-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl (2.7 MB view hashes)

Uploaded CPython 3.7+ manylinux: glibc 2.17+ ARM64

py_horned_owl-0.3.2-cp37-abi3-manylinux_2_5_i686.manylinux1_i686.whl (2.7 MB view hashes)

Uploaded CPython 3.7+ manylinux: glibc 2.5+ i686

py_horned_owl-0.3.2-cp37-abi3-macosx_11_0_arm64.whl (1.6 MB view hashes)

Uploaded CPython 3.7+ macOS 11.0+ ARM64

py_horned_owl-0.3.2-cp37-abi3-macosx_10_12_x86_64.whl (1.7 MB view hashes)

Uploaded CPython 3.7+ macOS 10.12+ x86-64

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page