Skip to main content

Java-free OWL 2 DL reasoning with pure-Python and optional Rust backends

Project description

pyHermiT

PyPI Python License

pyHermiT is specified as a Java-free Python and Rust reimplementation of the core HermiT OWL 2 DL reasoner, with a complete pure-Python fallback. It targets Python 3.10+ and uses the Java-free pyowl-core package for shared ontology parsing, immutable views, overlays, composites, and zero-reparse communication with Exact-OM and other consumers.

The 0.1.2 production implementation provides the public reasoner facade, complete pure-Python path, and an optional private Rust backend. The normative architecture, compatibility rules, backend completeness requirements, and verification plan begin at specs/README.md. Built runtime artifacts contain no Java, JVM launcher, Java bridge, or reference implementation.

Installation

python -m pip install pyHermiT

A supported native wheel enables Rust acceleration automatically. The universal wheel provides the complete compiler-free Python backend. Neither installation contains, downloads, or starts Java.

Quick start

from pyowl_core import ImportPolicy, LoadOptions, load_snapshot
from pyhermit import Reasoner

ontology = (
    b"Prefix(:=<urn:example#>) Ontology(<urn:example> "
    b"Declaration(Class(:A)) Declaration(Class(:B)) SubClassOf(:A :B))"
)
view = load_snapshot(
    ontology,
    options=LoadOptions(imports=ImportPolicy.RESOLVE_STRICT),
)

with Reasoner(view) as reasoner:
    assert reasoner.ontology is view
    assert reasoner.is_consistent()
    taxonomy = reasoner.class_hierarchy()

See the user guide for backend selection, import resolution, classification and realization queries, timeouts, updates, and error handling.

Release and licensing status

The owner has selected the source-guided implementation mode and LGPL-3.0-or-later, matching the pinned upstream declaration. LICENSE contains the LGPL text, COPYING the GPL text it incorporates, and NOTICE.md the initial upstream attribution. For 0.1.2, the owner explicitly waived the remaining LIC-001 legal-review signoff as-is without representing that legal review occurred. The waiver is recorded in reports/release/0.1.2-owner-release-override.md. The completed repository audits are under reports/licensing/ and reports/release/artifact-audit.md.

Documentation

Start with the user guide for backend selection, standalone and shared-view loading, every service family, updates, concurrency, and errors. The API reference enumerates every stable facade member, and the developer guide traces the core-view boundary through the private IR and Python/Rust engines. The documentation index links the normative specifications and machine-readable evidence.

The historical 0.1.1 qualification is recorded in the release report, coverage matrix, and benchmark audit. The owner accepted the remaining licensed W3C, live-reference, and dedicated-performance runs as post-release follow-up for 0.1.2. The release workflow separately requires every configured native target to pass before trusted publication.

Development

Use Python 3.10 or newer and install a compatible pyowl-core:

python -m pip install \
  "pyowl-core>=0.1,<0.2" \
  "build>=1.2,<2" "hypothesis>=6.100,<7" "import-linter>=2.1,<3" \
  "mypy>=1.10,<3" "packaging>=24,<27" "pytest>=8.2,<10" \
  "pytest-cov>=5,<8" "ruff==0.15.22" "setuptools==83.0.0" \
  "setuptools-rust==1.13.0" "tomli>=2.0,<3; python_version < '3.11'"
PYHERMIT_BUILD_NATIVE=0 python -m pip install --no-build-isolation -e .
python -m pytest
python -m tools.specs.check_workpackages
python -m tools.specs.check_project
python -m tools.specs.check_links
python -m tools.specs.check_release_gate --require-publishable
ruff format --check .
ruff check .
mypy
lint-imports
cargo deny --manifest-path native/Cargo.toml check --config deny.toml

Build and inspect the compiler-free artifacts with:

SOURCE_DATE_EPOCH=946684800 PYHERMIT_BUILD_NATIVE=0 python -m build
python -m tools.packaging_probe.check_artifact --pure dist/*.whl
python -m tools.packaging_probe.check_artifact dist/*.tar.gz

PYHERMIT_BUILD_NATIVE=auto|0|1 is the only supported build switch:

  • auto (default) attempts the optional native extension when Cargo is available and otherwise produces a truthfully tagged Python-only local build;
  • 0 never declares the extension and produces the reproducible py3-none-any fallback; and
  • 1 requires the locked Rust build and fails instead of silently falling back.

The distribution workflow builds the sdist, universal fallback, and the eight required cp310-abi3 manylinux 2.17, musllinux 1.2, macOS, and Windows x86-64/ARM64 targets. It audits Rust advisories/licenses/sources, ABI, and external libraries; installs on CPython 3.10 and 3.12; compares pure/native metadata and Python payloads, and verifies local-index resolver preference. The target manifest remains configured-awaiting-hosted-validation until those hosted jobs pass. The universal Python fallback is the portable production artifact while additional native wheels complete that hosted validation.

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

pyhermit-0.1.2.tar.gz (1.3 MB view details)

Uploaded Source

Built Distributions

If you're not sure about the file name format, learn more about wheel file names.

pyhermit-0.1.2-py3-none-any.whl (407.3 kB view details)

Uploaded Python 3

pyhermit-0.1.2-cp310-abi3-win_arm64.whl (3.7 MB view details)

Uploaded CPython 3.10+Windows ARM64

pyhermit-0.1.2-cp310-abi3-win_amd64.whl (4.1 MB view details)

Uploaded CPython 3.10+Windows x86-64

pyhermit-0.1.2-cp310-abi3-musllinux_1_2_x86_64.whl (4.2 MB view details)

Uploaded CPython 3.10+musllinux: musl 1.2+ x86-64

pyhermit-0.1.2-cp310-abi3-musllinux_1_2_aarch64.whl (3.8 MB view details)

Uploaded CPython 3.10+musllinux: musl 1.2+ ARM64

pyhermit-0.1.2-cp310-abi3-manylinux2014_x86_64.manylinux_2_17_x86_64.whl (4.1 MB view details)

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

pyhermit-0.1.2-cp310-abi3-manylinux2014_aarch64.manylinux_2_17_aarch64.whl (3.7 MB view details)

Uploaded CPython 3.10+manylinux: glibc 2.17+ ARM64

pyhermit-0.1.2-cp310-abi3-macosx_11_0_arm64.whl (3.6 MB view details)

Uploaded CPython 3.10+macOS 11.0+ ARM64

pyhermit-0.1.2-cp310-abi3-macosx_10_12_x86_64.whl (4.1 MB view details)

Uploaded CPython 3.10+macOS 10.12+ x86-64

File details

Details for the file pyhermit-0.1.2.tar.gz.

File metadata

  • Download URL: pyhermit-0.1.2.tar.gz
  • Upload date:
  • Size: 1.3 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.3

File hashes

Hashes for pyhermit-0.1.2.tar.gz
Algorithm Hash digest
SHA256 053ea5a6ded4e3b6a9e9bb152428a8050d87f2b8ac4cecff4a2e300317417615
MD5 3f4c4715437b9a43aa5f28b72ef5a944
BLAKE2b-256 456d193600763ed63b5534b33aef4d0a7b92e876231682a7d5aa745de99065e5

See more details on using hashes here.

File details

Details for the file pyhermit-0.1.2-py3-none-any.whl.

File metadata

  • Download URL: pyhermit-0.1.2-py3-none-any.whl
  • Upload date:
  • Size: 407.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.3

File hashes

Hashes for pyhermit-0.1.2-py3-none-any.whl
Algorithm Hash digest
SHA256 e5da8e656d5918b20533844a8f4d716278f83990a232c4ee4bf0515867bb286f
MD5 03979679937ceacc2569548461afc371
BLAKE2b-256 944bfa58f2fc42d19382aa715acd4643c22f1735d72ab2ac4d602c2f3d1e800d

See more details on using hashes here.

File details

Details for the file pyhermit-0.1.2-cp310-abi3-win_arm64.whl.

File metadata

  • Download URL: pyhermit-0.1.2-cp310-abi3-win_arm64.whl
  • Upload date:
  • Size: 3.7 MB
  • Tags: CPython 3.10+, Windows ARM64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.3

File hashes

Hashes for pyhermit-0.1.2-cp310-abi3-win_arm64.whl
Algorithm Hash digest
SHA256 e8f7d8839af0a044463fe8ca712da39eb0945dc2808d1a4785796c92685d011d
MD5 be05bc2be2f72acdc1b429045b7f5769
BLAKE2b-256 93aa801dcfa45db5dbd8cf5b14c79b416490ebe1ba771798ad595f9650f4a4eb

See more details on using hashes here.

File details

Details for the file pyhermit-0.1.2-cp310-abi3-win_amd64.whl.

File metadata

  • Download URL: pyhermit-0.1.2-cp310-abi3-win_amd64.whl
  • Upload date:
  • Size: 4.1 MB
  • Tags: CPython 3.10+, Windows x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.3

File hashes

Hashes for pyhermit-0.1.2-cp310-abi3-win_amd64.whl
Algorithm Hash digest
SHA256 69c3baba01c6924e100677a2a85748cde8f66727517a650344549d57192719a2
MD5 f3c1fa2a62021fb65c6ce3cda61b2c98
BLAKE2b-256 a6f14ddfdfd49bdc452fe852cea82134ce08484b58d234f36388ab2876d780d8

See more details on using hashes here.

File details

Details for the file pyhermit-0.1.2-cp310-abi3-musllinux_1_2_x86_64.whl.

File metadata

File hashes

Hashes for pyhermit-0.1.2-cp310-abi3-musllinux_1_2_x86_64.whl
Algorithm Hash digest
SHA256 e04080e93cfa05a7d1ca1eab5056e404e54928c83cf3971d7d0b7d83a0c0b0df
MD5 735bf56d2b756e6d05512d12ce640a48
BLAKE2b-256 e3fe411feccf90abe744fa8265e0a9308d5109192c9fbb7c6785d50cf1ab4ace

See more details on using hashes here.

File details

Details for the file pyhermit-0.1.2-cp310-abi3-musllinux_1_2_aarch64.whl.

File metadata

File hashes

Hashes for pyhermit-0.1.2-cp310-abi3-musllinux_1_2_aarch64.whl
Algorithm Hash digest
SHA256 9da53adc378ddafd6031e317393554f264fbb3feef220d4166efeda602262401
MD5 c1bd977e7f83666f59186602c2f5dad6
BLAKE2b-256 ce881aaec105f66cdbecc6ed577c5a05e94f5274f2b37be6653184f51478ea17

See more details on using hashes here.

File details

Details for the file pyhermit-0.1.2-cp310-abi3-manylinux2014_x86_64.manylinux_2_17_x86_64.whl.

File metadata

File hashes

Hashes for pyhermit-0.1.2-cp310-abi3-manylinux2014_x86_64.manylinux_2_17_x86_64.whl
Algorithm Hash digest
SHA256 c003280cfe9e175418f23e61290b46165ea85038a9f0ce67425de924164d91e1
MD5 a82db56c97abcfe1c5564eb3cc27c4da
BLAKE2b-256 3cd28f3c105e10f70094d32ff5885fb01a7a14d1df471900ac9a67607f9702b3

See more details on using hashes here.

File details

Details for the file pyhermit-0.1.2-cp310-abi3-manylinux2014_aarch64.manylinux_2_17_aarch64.whl.

File metadata

File hashes

Hashes for pyhermit-0.1.2-cp310-abi3-manylinux2014_aarch64.manylinux_2_17_aarch64.whl
Algorithm Hash digest
SHA256 f18e01f68c7d7dbde7b5d57b60282845aecafe1bfaab5dd586485b7c5d15b208
MD5 e8cb7fb287f7f375b0e4bf32b759e268
BLAKE2b-256 a3d121478a9c6ab471cd9ee71548ff07f2dc64f79399240362125352fa0d4edd

See more details on using hashes here.

File details

Details for the file pyhermit-0.1.2-cp310-abi3-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for pyhermit-0.1.2-cp310-abi3-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 2720fc11e3e57f49aa3f893bfb6becf32fb05677118a21288f6e468791fe7456
MD5 76b35f3b04c37f414eb55151a03a97a9
BLAKE2b-256 e0d0a0dbf7715039cbd4126c4df58c62cea346172adb04692e6ec0e87856d649

See more details on using hashes here.

File details

Details for the file pyhermit-0.1.2-cp310-abi3-macosx_10_12_x86_64.whl.

File metadata

File hashes

Hashes for pyhermit-0.1.2-cp310-abi3-macosx_10_12_x86_64.whl
Algorithm Hash digest
SHA256 b078747e7d16a8c4538f982cd79e43ca62bb3de395a30deecb47e248913e3bfc
MD5 72ade0dbe57ec1c8004e8941fb63d5d6
BLAKE2b-256 aa79c8d71223bea5367b90f368010cba3cc8b5291c7b41828ad025d1a13553ae

See more details on using hashes here.

Supported by

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