Owlready2 is a Python library for ontology-oriented programming, allowing users to load OWL 2.0 ontologies as Python objects, modify them, save them, and perform reasoning via the HermiT reasoner. It includes an optimized RDF quadstore. Current version is 0.50 (as of latest release) and it follows an irregular release cadence. Requires Python >=3.6.
pip install owlready2No compatibility data collected yet for this library.
Verified import paths — ran on the pinned version, not inferred.
Load an OWL ontology, create classes, individuals, and properties, then run the HermiT reasoner.
Use `world = World()` and `onto = world.get_ontology(...)` instead of relying on the default world.
Use `import owlready2` and `from owlready2 import ...`
Always use `with onto: ...` when defining classes or properties.
Use `sync_reasoner_hermit()` instead.
Install build tools: on Windows install Microsoft C++ Build Tools; on Linux install g++ and python3-dev.
Run `pip install owlready2` and use `import owlready2`.
Use `from owlready2 import default_world`.
Add `from owlready2 import Thing` to your imports.
Wrap class definitions inside `with onto:`.
Update to latest version and use `onto.save()`.
No dependency data recorded yet.