Java-free OWL 2 DL reasoning with pure-Python and optional Rust backends
Project description
pyHermiT
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.1 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.1, 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.1-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.
Release qualification is recorded in the release report,
coverage matrix, and
benchmark audit. The owner accepted the
remaining external runs and hosted-platform evidence as post-release follow-up for
0.1.1; this does not certify unexecuted native targets.
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.5,<1" "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;0never declares the extension and produces the reproduciblepy3-none-anyfallback; and1requires 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
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 Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file pyhermit-0.1.1.tar.gz.
File metadata
- Download URL: pyhermit-0.1.1.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
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
0f010bd7db6a06827e0637594dfc553e5e27b21a9064e9856bca0a95b06c96da
|
|
| MD5 |
ab947f6cf8a4f8b172dac65e32a13260
|
|
| BLAKE2b-256 |
fdcf56e8d25f34bb0db7f1ab57213fcd438983d3eaae7245576b9e89c03ec4b1
|
File details
Details for the file pyhermit-0.1.1-py3-none-any.whl.
File metadata
- Download URL: pyhermit-0.1.1-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
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
631286d9a6f75a1b87aac14a56064ea43f6c77e5017423b4b6e1851ae698222e
|
|
| MD5 |
3d7bc643f96391448d070725a54720d1
|
|
| BLAKE2b-256 |
37b330b28d419ebedff79680514e151a7036b8b7ac78694ab2753e0e9d398041
|