holonic — Graph-Native Holonic RDF Systems
Overview
holonic is a lightweight Python client for building holonic
knowledge graphs backed by rdflib, Apache Jena Fuseki, or any
SPARQL-compliant quad store.
A holon is an IRI whose associated named graphs exist in an RDF dataset. The dataset IS the holarchy — no separate registry object. Portals are RDF triples discoverable via SPARQL; membranes are SHACL shapes; all state lives in the graph.
Try in Browser
The example notebooks run in your browser via JupyterLite. No installation required — the library and its dependencies load into a Pyodide kernel the first time you execute a cell.
What works: everything that doesn’t need external services or
system extensions — HolonicDataset, portal traversal, membrane
validation via SHACL, projections, scope resolution, the projection
plugin system. What doesn’t work: FusekiBackend (no HTTP in the
browser sandbox) and the yfiles-jupyter-graphs widgets from
notebook 11 (requires a Jupyter server extension). See the
00_start_here.ipynb notebook once you open the lab for the full
caveats.
Quick Start
from holonic import HolonicDataset
ds = HolonicDataset() # rdflib backend, in-memory
ds.add_holon("urn:holon:source", "Source Data")
ds.add_interior("urn:holon:source", '''
<urn:item:1> a <urn:type:Widget> ;
<urn:prop:name> "Alpha" .
''')
print(ds.summary())
Feature Tour
Feature |
Introduced |
Entry point |
|---|---|---|
Four-graph holon model |
0.1.x |
|
Portal traversal + provenance |
0.2.x |
|
Membrane validation (SHACL) |
0.2.x |
|
Projection utilities |
0.3.0 |
|
Console-friendly dataclasses |
0.3.1 |
|
Graph-level metadata |
0.3.3 |
|
Ontological graph types |
0.3.4 |
|
Scope resolution |
0.3.4 |
|
Projection plugin system |
0.3.5 |
|
Protocol rename + ABC |
0.4.0 |
|
Backends
RdflibBackend — Default. Zero infrastructure, pure Python.
FusekiBackend — Apache Jena Fuseki via SPARQL over HTTP.
Custom — Implement the
HolonicStoreprotocol, or inheritAbstractHolonicStorefor optional-method defaults.
See backends for the full protocol surface.
Migrating from 0.3.x
GraphBackend was renamed to HolonicStore in 0.4.0; the old name
remains as a deprecated alias through all of 0.4.x. Migration guide:
docs/MIGRATION.md.
Generating Documentation
pip install holonic[docs]
cd docs
sphinx-build -b html . _build/html
Running the Example Notebooks
pixi run serve
This launches JupyterLab with the eleven example notebooks in notebooks/ available. Notebooks are committed with outputs stripped; executing them locally populates output cells without affecting the committed state. Run pixi run check-notebooks before committing to confirm no outputs leaked in.
Roadmap
See the project README for the headline roadmap. Full requirements tracked in SPEC under R9.11–R9.22.