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.0 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. For 0.2.0, 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.2.0-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.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,<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.

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.2.0.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.2.0-py3-none-any.whl (407.4 kB view details)

Uploaded Python 3

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

Uploaded CPython 3.10+Windows ARM64

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

Uploaded CPython 3.10+Windows x86-64

pyhermit-0.2.0-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.2.0-cp310-abi3-musllinux_1_2_aarch64.whl (3.8 MB view details)

Uploaded CPython 3.10+musllinux: musl 1.2+ ARM64

pyhermit-0.2.0-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.2.0-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.2.0-cp310-abi3-macosx_11_0_arm64.whl (3.6 MB view details)

Uploaded CPython 3.10+macOS 11.0+ ARM64

pyhermit-0.2.0-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.2.0.tar.gz.

File metadata

  • Download URL: pyhermit-0.2.0.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.2.0.tar.gz
Algorithm Hash digest
SHA256 bac356cf74b8a9342fb9678fb9f2cfe393f79fb04bc1102901de51bc1ce0d966
MD5 9735d4c28cdb13c5f52ae987a6fa021e
BLAKE2b-256 7a5905111dfce4ab24b579c4bd2cf0fe2e8c1db02c50d4eb7a3275a3e05232ac

See more details on using hashes here.

File details

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

File metadata

  • Download URL: pyhermit-0.2.0-py3-none-any.whl
  • Upload date:
  • Size: 407.4 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.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 b20ad14156740709bdb749e9771ced38a792c1536b482ec96e30f965b57f99e0
MD5 c30c3a96788f825ecd0fb6900d4c4fbe
BLAKE2b-256 a3869c6a0e3e1c664f2060b5ad4e57d99601f6f86c2e9a9136d6377410349050

See more details on using hashes here.

File details

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

File metadata

  • Download URL: pyhermit-0.2.0-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.2.0-cp310-abi3-win_arm64.whl
Algorithm Hash digest
SHA256 8ae4a0018420d262d5eea737af47926e9e8e41accee878df5634efd23d744d2e
MD5 66e9062ec7b6099f9a3063ddedd50f10
BLAKE2b-256 ab0562dfa2ef8ee8a1dc1339b56982d05f56e1dbce71910cd171e5f495e11947

See more details on using hashes here.

File details

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

File metadata

  • Download URL: pyhermit-0.2.0-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.2.0-cp310-abi3-win_amd64.whl
Algorithm Hash digest
SHA256 abf527d5e0e1b21fb5be4ede3002806b1e5d6cc70b2b2ae000eac37a02c4d1ff
MD5 a199414d61db33d1be7a3f86ebde23e9
BLAKE2b-256 969ebfbdd496268fd019a9524072b145f23489fd4ec75c22e271b847193d8b30

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for pyhermit-0.2.0-cp310-abi3-musllinux_1_2_x86_64.whl
Algorithm Hash digest
SHA256 fcfc95a0ab1cf3d229f8c23de797b82eb371a36370bc4837f132ffd26893b71b
MD5 ce820cb5e57948f98f9b5e10eb3ce58c
BLAKE2b-256 d47ed6619b84ef8d92e72363f72456e9d52fa5fc068ae09a16e89fa345f47250

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for pyhermit-0.2.0-cp310-abi3-musllinux_1_2_aarch64.whl
Algorithm Hash digest
SHA256 2432b10de153d3f019d7fe1c2adf7c9ccf257da252099604a40caa088c00b382
MD5 74ae3a49117c1e658e786300df459f22
BLAKE2b-256 7c1a3979801f3619219398dcac81605c314a7338947b6509fa36e66391726d34

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for pyhermit-0.2.0-cp310-abi3-manylinux2014_x86_64.manylinux_2_17_x86_64.whl
Algorithm Hash digest
SHA256 63917514ac974ddc1bb3d83f40db86d50ab1e6863e9fb5d1a6c92fd96608f3af
MD5 b621fe9eb0de3bba3aa2a63bc47c8133
BLAKE2b-256 23cf51a19d058474db4f503ca5afea79205adebb4da91042810f1e811ca11bcd

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for pyhermit-0.2.0-cp310-abi3-manylinux2014_aarch64.manylinux_2_17_aarch64.whl
Algorithm Hash digest
SHA256 e63bb66f449a6f7ba98d2c1ab657091b4ef85ccecc2e1a06251e706a7375a5d4
MD5 a02d5b22d3ca9c183fafeb5af464a2e0
BLAKE2b-256 4b0e929270a16cb2a53c646124379ad8bcb251cad55716e134d69031f6c5d069

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for pyhermit-0.2.0-cp310-abi3-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 049c446a27628ade9027aa673b36b5edfc0868167de317c7bc9e2c82b3d60ae8
MD5 4939915b2713865520b33e1a28da8bde
BLAKE2b-256 8333aee088d2d92d8944f27668a80442adbd09dcba06a2bc0ede90a2b63c416e

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for pyhermit-0.2.0-cp310-abi3-macosx_10_12_x86_64.whl
Algorithm Hash digest
SHA256 d5d0d4cc725f428f8703511530f4cd01d27cb78eac1a12c2f8a8356705ca5e92
MD5 ecf35d4474a4f3b845724a7deafdc8a7
BLAKE2b-256 e986913c3cbd9ca72557d8462abd7db2e16334a581a53b013878dfc3244b266d

See more details on using hashes here.

Release history Release notifications | RSS feed

This release

0.2.0 This release

10 files

0.1.2

10 files

0.1.1

2 files

0.1.0

2 files

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