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
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file lovyou_eventgraph-0.3.0.tar.gz.
File metadata
- Download URL: lovyou_eventgraph-0.3.0.tar.gz
- Upload date:
- Size: 121.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.10.11
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
361fb69db68b0df3ac825270606b37c02bd476458337e32844e9b6c77b741f28
|
|
| MD5 |
e876210a17145719b2b42d1a3533196d
|
|
| BLAKE2b-256 |
5d2570d932252421bd6ed812845760d9d32b1c57a1857f58024df2b39c737264
|
File details
Details for the file lovyou_eventgraph-0.3.0-py3-none-any.whl.
File metadata
- Download URL: lovyou_eventgraph-0.3.0-py3-none-any.whl
- Upload date:
- Size: 74.8 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.10.11
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
16c6b49e6c099fd100a8250fc8928fcc33a86f298c31c35ea647309b7168a251
|
|
| MD5 |
ed3bed4ead2e5a8d99d6b916235f9c48
|
|
| BLAKE2b-256 |
b8d2990d08e490a33d5c168e6988b66a7e9992c4b72ffa2066682d296f1b049c
|