Event sourcing library for Python with pluggable backends.
event_sourcery/— core libraryevent_sourcery_sqlalchemy/,event_sourcery_django/,event_sourcery_kurrentdb/— backends (optional extras:sqlalchemy,django,kurrentdb)tests/— shared test suite run against every backenddocs/— documentation (zensical)
Package manager: uv (PEP 621 pyproject.toml, uv.lock committed).
uv sync --all-extras # install all deps (dev group is included by default)docker compose up -d # required before tests (postgres, kurrentdb, rabbitmq)
poe test # pytest with coverage (fail_under = 100)
poe lint-fix # ruff format + ruff check + mypy (must pass clean)
poe docs-test # pytest docs/code/ — snippets embedded in docs must pass
poe docs-serve # docs live previewRun single tools via uv run --all-extras <tool>, e.g. uv run --all-extras pytest tests/event_store -k django.
- Python >= 3.10, strict mypy (
disallow_untyped_defs), ruff line-length 88. - New backend functionality goes through the shared test suite in
tests/; usenot_implemented/skip_backendmarkers for unsupported features. - Version bumps:
uv version --bump alpha(CI autopublishes prereleases on push to main).
Changing public API or behavior requires updating docs/ and running docs tests —
pages embed runnable snippets from docs/code/ (via --8<-- includes), and broken
snippets go unnoticed without them. Docs tests need no docker services. After touching docs code:
poe docs-test # snippets are real tests, must pass (enforced in CI)
poe docs-lint-fix # lint docs/code
uv run --all-extras zensical build --clean # verify docs build