For DDD practitioners in Python

Domain-driven design in Python, without hand-rolling it.

You know aggregates, value objects, and bounded contexts. In Python you have been building them by hand, or envying what Axon gives Java and Marten gives .NET. Protean is that framework, for Python, open source, with the server included.

Get started → Back to overview

The tactical patterns, as first-class code

Aggregates, entities, value objects, commands, events, and handlers map directly to the DDD patterns, written as plain decorated Python. There is no base-class ceremony to learn; an aggregate class reads like the model you drew.

Invariants the framework enforces

Aggregate invariants run automatically on every change, across four layers, and roll back on failure. Invalid state cannot exist, so you stop scattering defensive checks through the code.

The server is included

Commands, projections, an async engine with priority lanes, an outbox, and a dead-letter queue are all in the open-source core. None of the good parts sit behind a commercial server.