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.4.0.tar.gz (123.9 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.4.0-py3-none-any.whl (75.6 kB view details)

Uploaded Python 3

File details

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

File metadata

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

File hashes

Hashes for lovyou_eventgraph-0.4.0.tar.gz
Algorithm Hash digest
SHA256 fc37d94a87ddf167f35d6901a5ba5cd42f1a50ffc2c0ae5fa6288c24160416f1
MD5 9d194f1f7c5f3c0c513149a02e192756
BLAKE2b-256 defaeaef57da1826f40707c61401d93ed4d4d105952e934a861f1c874dbe43df

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for lovyou_eventgraph-0.4.0-py3-none-any.whl
Algorithm Hash digest
SHA256 ef7ec835b2712fa30f202604fcf8bcaa094d7d69b3ccbfb550fe56d5e8af383d
MD5 05e32d10ed155fd2c66a9acc12729a75
BLAKE2b-256 cb5fedd43e9c3039333beb3653a502f7eaa94b0d410dbc34749276b49f87784e

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