// the find
pyeventsourcing/eventsourcing
A library for event sourcing in Python.
A mature Python library for implementing event sourcing patterns — aggregates, event stores, snapshotting, projections, and full event-driven system wiring. It's opinionated about structure (the `@event` decorator approach forces you into its model) but handles the hard parts: versioning/upcasting, optimistic concurrency, and AES encryption at the application layer. For teams serious about DDD and wanting a Python library that goes beyond a toy example, this is the most complete option available.
The schema versioning and upcasting story is actually solved — you can evolve domain events after deployment without hand-migrating stored data, which most event sourcing implementations quietly skip. Application-level encryption means events are encrypted before hitting the database, covering wire and rest simultaneously without database-level config. The extension ecosystem is real: Django ORM, SQLAlchemy, KurrentDB (EventStoreDB), DynamoDB, gRPC — these are maintained under the same GitHub org, not abandoned forks. Dynamic Consistency Boundaries (DCB) support is present and benchmarked, which matters if you're dealing with cross-aggregate consistency without sagas.
The `@event` decorator magic is a leaky abstraction — it silently generates event classes from method signatures, which makes debugging event replay surprising and IDE navigation unreliable until you know exactly where to look. The library is heavily tied to its own `Application` base class; if you want to adopt just the persistence layer without the opinionated application structure, you'll fight it. PostgreSQL support is custom-rolled (`eventsourcing/postgres.py`) rather than delegated to SQLAlchemy, so you get two different infrastructure paths that diverge over time. At 1.6k stars for a library this capable, the community is thin — Slack channel or maintainer responsiveness under pressure is an open question.