Skip to main content

Python wrapper for rustdl — Rust-native OWL 2 DL reasoner (zero Java, zero C bindings)

Project description

rustdl-py

Python wrapper for rustdl — a Rust-native OWL 2 DL reasoner.

Zero Java. Zero C bindings. Just cargo install owl-dl-cli + pip install rustdl-py.

Install

# 1. Install the reasoner
cargo install owl-dl-cli

# 2. Install the Python wrapper
pip install rustdl-py

Quick Start

import rustdl_py

# Check consistency
consistent = rustdl_py.is_consistent("my_ontology.ofn")

# Classify (compute class hierarchy)
result = rustdl_py.classify("my_ontology.ofn")
print(f"Classes: {result.classes}, Mode: {result.mode}")
for subclass, superclass in result.subsumptions:
    print(f"  {subclass}{superclass}")

# Realize (compute individual types)
r = rustdl_py.realize("my_ontology.ofn")
for individual, types in r.types.items():
    print(f"{individual}: {', '.join(types)}")

# Explain a subsumption
explanation = rustdl_py.explain("my_ontology.ofn", ":Foo", ":Bar")
print(explanation["detail"])

API

Function Description
classify(ontology) Compute full class hierarchy
is_consistent(ontology) Check ontology consistency
realize(ontology) Compute individual → type mapping
explain(ontology, sub, sup) Explain subsumption entailment
is_satisfiable(ontology, class) Check class satisfiability
get_instances(ontology, class) List individuals of a class

Input must be OWL Functional Syntax (.ofn). Use export_to_owl.py --format ofn to convert from Turtle.

Requirements

  • Python ≥ 3.9
  • rustdl in PATH (install via cargo install owl-dl-cli)

License

MIT

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

rustdl_py-0.1.0.tar.gz (3.8 kB view details)

Uploaded Source

Built Distribution

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

rustdl_py-0.1.0-py3-none-any.whl (3.9 kB view details)

Uploaded Python 3

File details

Details for the file rustdl_py-0.1.0.tar.gz.

File metadata

  • Download URL: rustdl_py-0.1.0.tar.gz
  • Upload date:
  • Size: 3.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for rustdl_py-0.1.0.tar.gz
Algorithm Hash digest
SHA256 d30e7561b9bb01f504dcbe287d60238cb60b33f1411cfd729260d35974fcf12d
MD5 a651ffd22f72e7d45cd0c3a5e1861a85
BLAKE2b-256 fb5ccec68a8fc30a3c0b4a7b0b27ce006de3caf9a162782c5647385eb3e49d7a

See more details on using hashes here.

Provenance

The following attestation bundles were made for rustdl_py-0.1.0.tar.gz:

Publisher: ci.yml on alitrack/rustdl-py

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file rustdl_py-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: rustdl_py-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 3.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for rustdl_py-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 8e8eb439f4cb8508feeee166a41257ca64b2427d3c975cf09dd71817e4ee5e4c
MD5 d5f144f54806e0ce38c30679239a8d17
BLAKE2b-256 29555994900bc5116166613061c6c376294afe3ad6b943cf38a69c8dc20c63ea

See more details on using hashes here.

Provenance

The following attestation bundles were made for rustdl_py-0.1.0-py3-none-any.whl:

Publisher: ci.yml on alitrack/rustdl-py

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

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