Skip to main content

Hash-chained, append-only, causal event graph

Project description

EventGraph for Python

A hash-chained, append-only, causal event graph. The foundation for building systems where every action is signed, auditable, and causally linked.

Install

pip install lovyou-eventgraph

Quick Start

from eventgraph import (
    ActorID, EventType, ConversationID, NoopSigner,
    create_bootstrap, create_event, InMemoryStore,
)

# Create store and bootstrap
store = InMemoryStore()
signer = NoopSigner()
source = ActorID("actor_alice")
boot = create_bootstrap(source, signer)
store.append(boot)

# Record an event — hash-chained and causally linked
ev = create_event(
    event_type=EventType("trust.updated"),
    source=source,
    content={"score": 0.85, "domain": "code_review"},
    causes=[boot.id],
    conversation_id=ConversationID("conv_1"),
    prev_hash=boot.hash,
    signer=signer,
)
store.append(ev)

# Verify chain integrity
result = store.verify_chain()
assert result.valid

What's Included

  • Types — Always-valid domain models: Score [0,1], Weight [-1,1], Activation [0,1], Layer [0,13], Cadence [1,+inf), typed IDs (EventId, ActorId, Hash, etc.)
  • Event — Immutable events with canonical form, SHA-256 hash chain, and causal links
  • Store — Store protocol and InMemoryStore with chain integrity enforcement
  • Bus — Pub/sub event bus with pattern-based subscriptions
  • Primitive — Primitive protocol, lifecycle state machine, and registry
  • Tick Engine — Ripple-wave processor with cadence control and quiescence detection

Conformance

This package produces identical SHA-256 hashes to the Go reference implementation for the same canonical form inputs. 135 tests including conformance vectors.

Links

License

BSL 1.1 converting to Apache 2.0 on 26 February 2030.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

lovyou_eventgraph-0.5.0.tar.gz (146.4 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

lovyou_eventgraph-0.5.0-py3-none-any.whl (93.3 kB view details)

Uploaded Python 3

File details

Details for the file lovyou_eventgraph-0.5.0.tar.gz.

File metadata

  • Download URL: lovyou_eventgraph-0.5.0.tar.gz
  • Upload date:
  • Size: 146.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.12

File hashes

Hashes for lovyou_eventgraph-0.5.0.tar.gz
Algorithm Hash digest
SHA256 3b08bbe8daf8e825d8c7c71102282cc74dfe17a50e6bcb246229ae7efe4a2c59
MD5 1fc9a52da6fc9371db50a1cbd976f507
BLAKE2b-256 ce32bfc6d80c9c18885c53ad58def582f12efcb8cd6de4119ec152129d2f04bf

See more details on using hashes here.

File details

Details for the file lovyou_eventgraph-0.5.0-py3-none-any.whl.

File metadata

File hashes

Hashes for lovyou_eventgraph-0.5.0-py3-none-any.whl
Algorithm Hash digest
SHA256 d2122151b054eca5f4477a136c415f462c2a13ee355bba86d3332d3250b91068
MD5 8cb099834b6aea32aef2e1d47458e9b1
BLAKE2b-256 e16417fee869ded7d8452a1db69384aec974343457961877f79e1f43562465cd

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page