OntoEnv¶
pip install ontoenv
cargo install ontoenv-cli
Import resolution — Follows
owl:importsdeclarations to fetch and cache every transitive dependency.Dependency graph — Builds a petgraph-backed directed graph for querying closures, finding roots, and detecting cycles.
Fast on-disk store — Persists the environment in a compact binary RDF5D format; restores in milliseconds without re-parsing.
Python bindings — Full PyO3 bindings expose every feature to Python, with native
rdflibgraph interop.Flexible filtering — Glob and regex filters on file paths and ontology IRIs let you include exactly what you need.
Remote caching — Fetches remote ontologies over HTTP and caches them locally with a configurable TTL.
Quick start¶
# Initialize a workspace from a directory of ontology files
ontoenv init ./ontologies
# List everything that was discovered
ontoenv list ontologies
# Get the full transitive closure for one ontology
ontoenv closure https://example.com/myOntology
from ontoenv import OntoEnv
env = OntoEnv(
path=".",
recreate=True,
search_directories=["./ontologies"],
includes=["*.ttl"],
)
# Get a merged rdflib graph of an ontology and all its imports
g = env.get_closure("https://example.com/myOntology")
Explore the docs¶
Getting Started — Installation, first workspace, filters, and the Python quickstart.
Python API — Full reference for the
ontoenvPython package.CLI Reference — All subcommands, flags, and configuration options.
Rust API — Auto-generated crate docs on docs.rs.
Changelog — Release history and what changed in each version.
Need a plain-text snapshot for LLM ingestion? Grab llms.txt.