Skip to content

Build once.
Swap anything.

Your business logic shouldn't care whether it's Postgres or Mongo behind it. Write it once against contracts, then plug in any database, queue, or cache — without touching a line of domain code.

No vendor lock-in Type-safe contracts Testable by design
app.py
# Business logic depends on a contract, not a vendor
class PlaceOrder(Handler):
    orders: OrderCommandPort
    items: OrderItemCommandPort

    async def __call__(self, args: OrderCreateArgs):
        order = await self.orders.create(args.metadata)
        items = await self.items.create_many(args.items)

        return order.id

# Swap infrastructure — domain code never changes
runtime = build_runtime(PostgresDepsModule(...))
Plug into the infrastructure you already use