Skip to main content

causalontology-py

The second implementation of the Causalontology standard — the proof of language independence. (The first is the PrologAI reference implementation.)

Zero dependencies — Python standard library only:

Module Implements
causalontology.canonical RFC 8785 (JSON Canonicalization Scheme) serialization, identity-bearing field filtering, Secure Hash Algorithm 256-bit (SHA-256) content-addressed identify()
causalontology.ed25519 pure-Python Ed25519 (RFC 8032), verified against the RFC's known-answer test
causalontology.signing record-level sign_record() / verify_record() over canonical identity-bearing bytes
causalontology.schema validation against the twenty-one JSON Schemas in spec/schema/
causalontology.semantics the 25 semantic rules: temporal admissibility (fixed constants), formal conflict, refinement validity, bridged reachability, stratal classification, the skip decision, enrichment field/shape rules, and the token-tier coherence checks
causalontology.store an in-memory conformant store: idempotent immutable puts, signed add-only records, materialized enrichment views with contributors, retraction and succession lineage, the resolve minimum, the deterministic cycle-breaking view rule, and the stigmergy gaps() read

Conformance

$ python3 tests/run_conformance.py
...
137/137 vectors passed
causalontology-py is CONFORMANT to the suite (vectors frozen at specification 4.0.0).

The vectors are frozen at specification 4.0.0 (2026-07-22; 137 vectors, V01–V137): they carry concrete identifiers, real keys, and a real verifying signature. The harness's old normalization now simply passes frozen values through.

Thirty-second taste

from causalontology import identify, InMemoryStore, keypair_from_seed, sign_record
import hashlib

store = InMemoryStore()
press = store.put({"type": "occurrent", "label": "press_button", "category": "action"})
light = store.put({"type": "occurrent", "label": "light_on", "category": "state_change"})
claim = store.put({"type": "causal_relation_object", "causes": [press], "effects": [light]})

print(store.gaps("missing_field"))   # the degenerate claim is a visible invitation

sk, source = keypair_from_seed(hashlib.sha256(b"alice").digest())
store.put_record(sign_record({"type": "assertion", "about": claim,
                              "source": source, "evidence_type": "imported",
                              "confidence": 0.5,
                              "timestamp": "2026-07-13T00:00:00Z"}, sk))

License: "The attribution always; no profit, no problem license." — see the repository LICENSE and NOTICE.

Metadata

Release files for causalontology 4.0.0

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

Built distribution (wheel)

Table of built distributions (wheels) for causalontology 4.0.0
File Interpreter ABI Platform
causalontology-4.0.0-1-py3-none-any.whl Python 3 none any Details

Release files / causalontology-4.0.0-1-py3-none-any.whl

Download URL causalontology-4.0.0-1-py3-none-any.whl
Size 45.7 kB
Tags Python 3
SHA-256 checksum
How to use checksums
45ff75018efba09ea8f86316b16b8beb1a12ed33695b86b5208ede17943e790d
BLAKE2b-256 checksum
How to use checksums
8bf7542d5deddab1a42cd4b90f500b339700f1539ff9afb677f8ae1573030ed5
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.12.3

Release history Release notifications | RSS feed

This release

4.0.0 This release

1 release file

2.0.0

2 release files

1.0.0

2 release files

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