Skip to main content

Ontoplexis

Query OWL 2 ontologies with Cypher.

Ontoplexis loads an OWL/XML document into an embedded Ladybug graph whose shape is the OWL 2 structural specification, exposes raw Cypher over it, and serializes the graph losslessly back to OWL/XML. If you can write a graph query, you can introspect, test, diff, and author ontologies — no ontologist's API, no JVM.

Scope

OWL/XML         ──(one generic walker)──▶  Ladybug graph
Ladybug graph   ──(the inverse walker)──▶  OWL/XML

Ontoplexis owns the OWL/XML-to-graph mapping, embedded graph storage, Cypher access, and OWL/XML round trips. Alongside the structural graph it maintains a derived-edge table that exposes the common binary relations (subsumption, typing, labels, …) as one-hop edges — a refreshable cache over asserted structure, not inference. It does not provide typed Python classes for OWL axioms, format conversion, reasoning, or profile checking.

Relationship to the stack

Ontoplexis is the graph core for the family:

  • Ontopoiesis depends on it for operator workflows: build, lint, test, diff, impact analysis, rendering, and migrations.
  • Ontophora is the independent sister library for typed OWL 2 construct records. Ontoplexis deliberately keeps its structural model in the graph rather than depending on those models.

Installation

pip install ontoplexis

Pure Python; requires Python 3.11+.

Quickstart

from pathlib import Path
from ontoplexis import Ontology

ont = Ontology.from_owlxml(Path("pizza.owx").read_text())

with ont.project() as proj:
    # Derived one-hop edges for the common relations …
    rows = proj.execute(
        "MATCH (a:N)-[:D {relation: 'subclass_of'}]->(b:N) "
        "RETURN a.iri AS sub_iri, b.iri AS super_iri"
    )
    # … and the full structural graph when you need every construct.
    axioms = proj.execute(
        "MATCH (ax:N)-[:E]->(:N {iri: 'https://example.org/pizza#Margherita'}) "
        "RETURN DISTINCT ax.kind AS kind"
    )

print(ont.to_owlxml())   # lossless round trip

Documentation

The documentation covers the quickstart, graph schema, edge roles, authoring with Cypher, document conversion, and development setup.

License

Ontoplexis is licensed under the Apache License 2.0.

Metadata

Release files for ontoplexis 2026.7.19

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

Source distribution (sdist)

Source distribution for ontoplexis 2026.7.19
File Size Uploaded Provenance Actions
ontoplexis-2026.7.19.tar.gz 22.6 kB With provenance Details for ontoplexis-2026.7.19.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for ontoplexis 2026.7.19
File Interpreter ABI Platform Actions
ontoplexis-2026.7.19-py3-none-any.whl Python 3 none any Details for ontoplexis-2026.7.19-py3-none-any.whl

Total release size: 46.0 kB

Release files / ontoplexis-2026.7.19.tar.gz

Download URL ontoplexis-2026.7.19.tar.gz
Size 22.6 kB
Tags Source
SHA-256 checksum
How to use checksums
ae1487a7b8bb1074644e410df6622cff038f290f38a25ddd71dd005d6093a0b8
BLAKE2b-256 checksum
How to use checksums
04b2152b1f47c5bf4cab82a3e20107469e05272dbd7c564760dc8dd59bfe6f20
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.14

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 Jul 19, 2026.

Transparency log

Release files / ontoplexis-2026.7.19-py3-none-any.whl

Download URL ontoplexis-2026.7.19-py3-none-any.whl
Size 23.3 kB
Tags Python 3
SHA-256 checksum
How to use checksums
b3062a200e5d00f75b3505429a4ee0099e7ff31725255f4987cfacdaecf3fee6
BLAKE2b-256 checksum
How to use checksums
3dd52bbaeb914792de59814745ba7a56d8a09b76d24b355bbd402d396198c3ad
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.14

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 Jul 19, 2026.

Transparency log

Security for ontoplexis 2026.7.19

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 2 files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for ontoplexis-2026.7.19.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 Jul 19, 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.

Release history Release notifications | RSS feed

This release

2026.7.19 This release

2 release files Full provenance

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