Skip to main content

ISONGraph

isongraph-ext

Prove what a graph is, where it came from, and how to show it — without changing the graph.

CI MIT License Python 3.12+ Alpha

ISONGraph stores a graph as a compact, token-efficient file. That file deliberately says nothing about who made it, where its facts came from, or how a viewer should draw it. isongraph-ext answers those three questions with small companion files that sit next to the graph and are tied to its exact bytes by SHA-256. The graph itself is never modified, and everything works offline.

graph.ison          the ordinary ISONGraph; Core reads it exactly as before
  |-- graph.igx.ison    IGX/1   binding      "is this the graph I was promised?"
  |-- graph.igpv.ison  IGPV/1  provenance   "where did this come from?"
  `-- graph.igdm.ison  IGDM/1  datamatics   "how should a viewer present it?"

Each companion is optional and independent. A consumer that knows none of them still has the whole graph.

Install

pip install isongraph-ext

Python 3.12+. Pure Python. The only dependencies are ison-graph==1.4.1 and ison-py==1.2.0, pinned exactly, because the package verifies against the Core baseline it was measured with.

Try it

Bind a graph to its bytes, verify it, then change one byte:

from ison_graph import ISONGraph
from isongraph_ext import igx

g = ISONGraph()
g.add_node("person", "ada", name="Ada")
g.add_node("person", "grace", name="Grace")
g.add_edge("knows", ("person", "ada"), ("person", "grace"))
data = g.to_ison().encode("utf-8")

binding = igx.bind(data, serialization_profile="ison-v1", producer_port="python", identity_claim="artifact")
result, decision = igx.verify_and_admit(binding, data)
print("admitted:", decision.admitted, "| steps:", ", ".join(result.steps_passed))

try:
    igx.verify(binding, data + b"\n# edited")
except igx.IGXError as e:
    print("tampered:", e.code, "at", e.step)
admitted: True | steps: V0, V1, V2, V3, V4, V5
tampered: SOURCE_BINDING_MISMATCH at V4

Verification is a fixed sequence of numbered steps, and every failure names the step and a stable error code.

Project a bounded subgraph

Select what an agent, a report or a viewer needs, with proof of where every part came from:

from ison_graph import ISONGraph
from isongraph_ext.igp import Policy, project
from isongraph_ext.igpv import NodeRef

g = ISONGraph()
for name in ("ada", "grace", "linus"):
    g.add_node("person", name)
g.add_edge("knows", ("person", "ada"), ("person", "grace"))
g.add_edge("knows", ("person", "grace"), ("person", "linus"))
data = g.to_ison().encode("utf-8")

policy = Policy(anchors=(NodeRef("person", "ada"),), direction="out", depth=1)
result = project(data, policy)
print("selected:", result.stats["selected_nodes"], "nodes,", result.stats["result_edges"], "edge")
print("lineage rows:", len(result.payload.derivations), "| policy digest:", result.policy_sha256[:12])
selected: 2 nodes, 1 edge
lineage rows: 3 | policy digest: 2b7fbfb0ce34

The policy is a canonical file you can keep next to the graph (policy.to_ison()); its digest is recorded in the lineage. result.result_bytes is an ordinary ISONGraph, result.payload an IGPV/1 lineage payload, and verify_projection recomputes both from the source and the policy. The policy never inspects property values: you choose the anchors, IGP/1 does the structural work. Specification: 21-IGP1-DESIGN.md.

Command line

python -m isongraph_ext.igx   verify graph.ison graph.igx.ison                  # exit 0 ok, 1 invalid, 64 usage
python -m isongraph_ext.igx   admit  graph.ison graph.igx.ison                  # exit 0 admitted, 2 denied
python -m isongraph_ext.igpv  verify graph.ison graph.igx.ison graph.igpv.ison [--source SHA256=PATH]
python -m isongraph_ext.igpv  origins <graph-sha256> graph.igpv.ison --node person ada
python -m isongraph_ext.igdm  verify graph.ison graph.igx.ison graph.igdm.ison
python -m isongraph_ext.igp   project graph.ison policy.igp.ison --out out/       # writes result.ison and result.igpv.ison
python -m isongraph_ext.igp   verify  graph.ison policy.igp.ison result.ison result.igpv.ison

Output is itself ISON, so receipts can quote it verbatim.

What you get

Capability What it does
IGX/1 binding Pins the exact bytes, the Core version they were written with and an identity claim (none, artifact, producer_bound). Unknown capabilities are reported or refused, never silently ignored.
IGPV/1 provenance Attributes nodes and edges to source documents, with byte or line spans checked against the real bytes, and records derivation lineage: this node stands for those nodes in an earlier graph.
IGP/1 projection Selects a bounded, deterministic subgraph from explicit anchors, allow-lists, direction, depth and budgets, and returns an ordinary graph plus IGPV/1 provenance for every node and edge; recomputable from the source and the policy.
IGDM/1 datamatics Renderer-neutral presentation intent: semantic roles, emphasis, badges, groups, layout hints and accessibility text. Never colours, fonts or coordinates.

Built to be checked

  • Byte-exact. Companion files are canonical by construction: one graph, one companion, one set of bytes, one SHA-256.
  • Specified before coded. Frozen specifications for IGX/1, IGPV/1, IGDM/1 and IGP/1 live in the repository; the code follows them, never the reverse.
  • Conformance vectors. 217 byte-exact vectors and about 590 tests are replayed in CI on every change.
  • Pinned to a measured Core. The package embeds the Core baseline it was verified against, plus Core's conformance receipts, so identity claims are checkable rather than asserted.
  • Hostile-input safe. Parsing is bounded by explicit size and row budgets; verification reports the first failing step instead of guessing.

Examples

Four runnable demonstrations (a non-software provenance graph, a supply-chain presentation graph, a minimal generic SVG adapter and a Core-only consumer) are in the examples folder of the repository.

Status and limits

This is an early-stage (alpha) release. Know what it does not do:

  • A verified binding proves reproducibility and consistency, not authorship; producer_port is a checked claim, not authentication.
  • Provenance proves origin and lineage, not that an extracted statement is true.
  • The cross-port identity claim and lossy producer-bound admission are reserved. Revision, delta and DAG capabilities are not implemented. Projection is structural only (no property filters) and supports directed simple graphs.
  • IGDM/1 carries presentation intent only and renders nothing.
  • Python reference implementation only. Verification is an offline cost: roughly 2 seconds for a 10,000-node graph with a capability.

Source and issues · Changelog · Security policy · ISONGraph Core

MIT — Copyright (c) 2026 Mahesh Vaikri.

Metadata

Release files for isongraph-ext 0.4.1

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

Source distribution (sdist)

Source distribution for isongraph-ext 0.4.1
File Size Uploaded Provenance Actions
isongraph_ext-0.4.1.tar.gz 112.9 kB With provenance Details for isongraph_ext-0.4.1.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for isongraph-ext 0.4.1
File Interpreter ABI Platform Actions
isongraph_ext-0.4.1-py3-none-any.whl Python 3 none any Details for isongraph_ext-0.4.1-py3-none-any.whl

Total release size: 192.5 kB

Release files / isongraph_ext-0.4.1.tar.gz

Download URL isongraph_ext-0.4.1.tar.gz
Size 112.9 kB
Tags Source
SHA-256 checksum
How to use checksums
4bd74d85e8fbe6376f543a928ece2d52d807283d7c2745c463529a1583d729a3
BLAKE2b-256 checksum
How to use checksums
30c3484b56c41747f3267d2111669c295295d052bd9a3ba83fef9fa076fda2e3
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

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 Nov 10, 2026.

Transparency log

Release files / isongraph_ext-0.4.1-py3-none-any.whl

Download URL isongraph_ext-0.4.1-py3-none-any.whl
Size 79.6 kB
Tags Python 3
SHA-256 checksum
How to use checksums
3c9dc6423b26ca6d2c71142ef1112f730496e7e53b30a440d3371db1a6d4acca
BLAKE2b-256 checksum
How to use checksums
252dc9f287422d720c050f9304e693156b9cfa730e2f2b03bc7ca5c55d513472
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

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 Nov 10, 2026.

Transparency log

Security for isongraph-ext 0.4.1

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

Both files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for isongraph_ext-0.4.1.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 Nov 10, 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.

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