Skip to main content

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.2.1 production implementation provides the public reasoner facade, complete pure-Python path, and an optional private Rust backend. It consumes the pyowl-core 0.2 model and can compile its encoded structural-view schema 2 directly in Rust. 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. Existing 0.1 deployments should follow the 0.2 migration guide before reusing persisted data or caches.

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. The owner authorized 0.2.1 publication under the existing licensing policy; LIC-001 remains waived without representing that legal review occurred. The authorization is recorded in reports/release/0.2.1-owner-release-override.md. The completed repository audits are under reports/licensing/ and reports/release/artifact-audit.md.

Strict native pipeline

require_native_pipeline_support() checks the native HermiT and pyowl-core receipt capabilities before loading an ontology. Opt in with ReasonerConfig(require_native_pipeline=True) to require native structural validation, metadata, compilation and hierarchy processing. Defaults retain their existing behavior. Strict mode currently supports consistency and class/object/data-property hierarchies on core-validated native snapshot/segment owners. It rejects unsupported owners, Python or verification backends, and Python byte-indexing fallback explicitly. Assertion-local generic queries share the permanent native rules, join plans, role automata, datatype registries and existential templates. Only their facts, clauses, witnesses and mutable tableau state are local. Batches retain at most one active query state; result caches contain bounded Boolean results.

The admitted query syntax includes Boolean class expressions, nominals/equality, known role assertions, existing source literals, universal restrictions and ground existential witnesses. Unknown roles or new literal payloads, newly required inverse-role blocking, nested existential expansions below variable-valued universal restrictions, and global schema/role changes retain the full native rebuild path by default. Strict mode rejects these cases before publication. Realization publication and committed updates are not yet admitted in strict mode. Recurring committed updates have not been established as an Exact workload, so incremental admission remains conditional rather than widening this query envelope.

Reasoner.diagnostics() reports the actual core receipt, metadata validation and domain copies. native_result_validation becomes true after a successful native hierarchy result; native_result_publications counts these publications. A positive capability probe does not replace owner validation or admit an unsupported operation. The native_query_* counters separately record delta loads, local rule plans, peak local records, legacy full-program loads and default full-rebuild fallbacks. Query syntax is limited to 1 MiB per request, 16 MiB and 4,096 items per batch; exhausting a resource bound never enables a fallback.

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.2.0. 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.2.1,<0.3" \
  "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.

Metadata

Release files for pyHermiT 0.2.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for pyHermiT 0.2.1
File Size Uploaded Provenance Actions
pyhermit-0.2.1.tar.gz 1.3 MB With provenance Details for pyhermit-0.2.1.tar.gz

Built distributions (wheels)

Table of built distributions (wheels) for pyHermiT 0.2.1
File Actions
pyhermit-0.2.1-py3-none-any.whl Python 3 none any Details for pyhermit-0.2.1-py3-none-any.whl
pyhermit-0.2.1-cp310-abi3-win_arm64.whl CPython 3.10 abi3 Windows ARM64 Details for pyhermit-0.2.1-cp310-abi3-win_arm64.whl
pyhermit-0.2.1-cp310-abi3-win_amd64.whl CPython 3.10 abi3 Windows x86-64 Details for pyhermit-0.2.1-cp310-abi3-win_amd64.whl
pyhermit-0.2.1-cp310-abi3-musllinux_1_2_x86_64.whl CPython 3.10 abi3 Linux musl 1.2+ x86-64 Details for pyhermit-0.2.1-cp310-abi3-musllinux_1_2_x86_64.whl
pyhermit-0.2.1-cp310-abi3-musllinux_1_2_aarch64.whl CPython 3.10 abi3 Linux musl 1.2+ ARM64 Details for pyhermit-0.2.1-cp310-abi3-musllinux_1_2_aarch64.whl
pyhermit-0.2.1-cp310-abi3-manylinux2014_x86_64.manylinux_2_17_x86_64.whl CPython 3.10 abi3 Linux glibc 2.17+ x86-64 Details for pyhermit-0.2.1-cp310-abi3-manylinux2014_x86_64.manylinux_2_17_x86_64.whl
pyhermit-0.2.1-cp310-abi3-manylinux2014_aarch64.manylinux_2_17_aarch64.whl CPython 3.10 abi3 Linux glibc 2.17+ ARM64 Details for pyhermit-0.2.1-cp310-abi3-manylinux2014_aarch64.manylinux_2_17_aarch64.whl
pyhermit-0.2.1-cp310-abi3-macosx_11_0_arm64.whl CPython 3.10 abi3 macOS 11.0+ ARM64 Details for pyhermit-0.2.1-cp310-abi3-macosx_11_0_arm64.whl
pyhermit-0.2.1-cp310-abi3-macosx_10_12_x86_64.whl CPython 3.10 abi3 macOS 10.12+ x86-64 Details for pyhermit-0.2.1-cp310-abi3-macosx_10_12_x86_64.whl

Total release size: 34.4 MB

Release files / pyhermit-0.2.1.tar.gz

Download URL pyhermit-0.2.1.tar.gz
Size 1.3 MB
Tags Source
SHA-256 checksum
How to use checksums
ed5f67d528a10fecbed6a0d87c1597b1c86f60d4657f2106e37f70d9534bf8be
BLAKE2b-256 checksum
How to use checksums
442c27bc5ce7523a14fc446a77ca2a396958bbd84a1c7e8dafd22e038053a25a
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.13

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Sep 20, 2026.

Transparency log

Release files / pyhermit-0.2.1-py3-none-any.whl

Download URL pyhermit-0.2.1-py3-none-any.whl
Size 419.4 kB
Tags Python 3
SHA-256 checksum
How to use checksums
336713b7d91223818b8f775285d499a680206314106b74c2154f1c96e4ebc0f6
BLAKE2b-256 checksum
How to use checksums
85f0b8dfc930ceb69aa72465e89f2f41d0abcf8692442e194c93273233ec1ee8
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.13

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Sep 20, 2026.

Transparency log

Release files / pyhermit-0.2.1-cp310-abi3-win_arm64.whl

Download URL pyhermit-0.2.1-cp310-abi3-win_arm64.whl
Size 3.9 MB
Tags CPython 3.10 Windows ARM64 abi3
SHA-256 checksum
How to use checksums
9c0c3d5523f39c16716d288b26c29d09f961cae913ae31a0b846477ac394fe68
BLAKE2b-256 checksum
How to use checksums
d22fbea9899a365aefaa530c84d8034bd79402d7e93bfbe673852653ee2e5f28
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.13

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Sep 20, 2026.

Transparency log

Release files / pyhermit-0.2.1-cp310-abi3-win_amd64.whl

Download URL pyhermit-0.2.1-cp310-abi3-win_amd64.whl
Size 4.3 MB
Tags CPython 3.10 Windows x86-64 abi3
SHA-256 checksum
How to use checksums
0b15cb06c014265132d3792ef5969fbe47751d10671707d56777658cd390337d
BLAKE2b-256 checksum
How to use checksums
98c6661598320312e1b701213c5a591774d9240167ceece10cdc219d01216b92
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.13

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Sep 20, 2026.

Transparency log

Release files / pyhermit-0.2.1-cp310-abi3-musllinux_1_2_x86_64.whl

Download URL pyhermit-0.2.1-cp310-abi3-musllinux_1_2_x86_64.whl
Size 4.4 MB
Tags CPython 3.10 Linux musl 1.2+ x86-64 abi3
SHA-256 checksum
How to use checksums
5e515ad73d7ab98f5c539c3a19dd4728a051039caa3f1c633f4304a96477e24d
BLAKE2b-256 checksum
How to use checksums
0c3222867ac4614ca34f32dcce9c5cf9ac76ab9f36b3324c424562d39ceed3aa
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.13

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Sep 20, 2026.

Transparency log

Release files / pyhermit-0.2.1-cp310-abi3-musllinux_1_2_aarch64.whl

Download URL pyhermit-0.2.1-cp310-abi3-musllinux_1_2_aarch64.whl
Size 3.9 MB
Tags CPython 3.10 Linux musl 1.2+ ARM64 abi3
SHA-256 checksum
How to use checksums
ed80d65eff74d4895595c59981883d30feed1aa02b2a680168bc2db745d14975
BLAKE2b-256 checksum
How to use checksums
9a212647f5954747cb7c29399c116e2035ef7bb4178683e6f1533a4997d1ac08
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.13

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Sep 20, 2026.

Transparency log

Release files / pyhermit-0.2.1-cp310-abi3-manylinux2014_x86_64.manylinux_2_17_x86_64.whl

Download URL pyhermit-0.2.1-cp310-abi3-manylinux2014_x86_64.manylinux_2_17_x86_64.whl
Size 4.3 MB
Tags CPython 3.10 Linux glibc 2.17+ x86-64 abi3
SHA-256 checksum
How to use checksums
a0b14dc90902350c32a729159f459a84ff75d689266890f1febefb55c7b0d8ea
BLAKE2b-256 checksum
How to use checksums
e7768ba037a52ff8f5ac45b9aa86d453c95e5583414dd6a7beb194c7cc51cbcc
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.13

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Sep 20, 2026.

Transparency log

Release files / pyhermit-0.2.1-cp310-abi3-manylinux2014_aarch64.manylinux_2_17_aarch64.whl

Download URL pyhermit-0.2.1-cp310-abi3-manylinux2014_aarch64.manylinux_2_17_aarch64.whl
Size 3.8 MB
Tags CPython 3.10 Linux glibc 2.17+ ARM64 abi3
SHA-256 checksum
How to use checksums
e08dd27555e1ed6b43489b53c227d821db100161ca79162210b472ecd6bad24e
BLAKE2b-256 checksum
How to use checksums
5813c7555470a736e9a669ee9ed7234ab1cfe3ca8aeeab720f79c2554eed922d
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.13

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Sep 20, 2026.

Transparency log

Release files / pyhermit-0.2.1-cp310-abi3-macosx_11_0_arm64.whl

Download URL pyhermit-0.2.1-cp310-abi3-macosx_11_0_arm64.whl
Size 3.8 MB
Tags CPython 3.10 abi3 macOS 11.0+ ARM64
SHA-256 checksum
How to use checksums
9f16b46d8351a73135cf2111da5a80f55014df46250dac1247631efe4b8710af
BLAKE2b-256 checksum
How to use checksums
7abb576150a3f2986ef9fd5a5322d12ed95dc3b306e2a9543472221ad3fff331
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.13

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Sep 20, 2026.

Transparency log

Release files / pyhermit-0.2.1-cp310-abi3-macosx_10_12_x86_64.whl

Download URL pyhermit-0.2.1-cp310-abi3-macosx_10_12_x86_64.whl
Size 4.3 MB
Tags CPython 3.10 abi3 macOS 10.12+ x86-64
SHA-256 checksum
How to use checksums
da0fab7a39208004f1324a4a818f1324f980d47652e59a90a89221a6b12bf4ca
BLAKE2b-256 checksum
How to use checksums
9645f8c4e846aeac201a7a4c2e4c66edf2db6be02edad7d83c87549b13da129d
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.13

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Sep 20, 2026.

Transparency log

Security for pyHermiT 0.2.1

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

Full provenance

All 10 files in this release have been uploaded with provenance metadata.

Select from 10 files

Attestation for pyhermit-0.2.1.tar.gz

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Sep 20, 2026.

Transparency log

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page