Menu

Post image 1
Post image 2
Post image 3
1 / 3
0

An Ash-Inspired DDD Framework for Python: Derive Everything from the Domain Model

DEV Community: elixir·Sahil Pohare·3 days ago
#5QVeyw1q
#dev#restate#self#action#framework#fullscreen
Reading 0:00
15s threshold

I've been building PingerAgents — a multitenant AI agent orchestration platform. Along the way I ended up writing something that felt worth writing up on its own: a domain-driven design framework for Python that derives persistence, durable execution handlers, and tenant isolation from a single resource class. It's inspired by Elixir's Ash framework . This is a writeup of what it is, how it works, and the mistakes made building it. The Problem with Backend Glue Most backend code isn't business logic. It's wiring. You write a domain object, then you write: A SQLAlchemy model to persist it A repository with upsert semantics HTTP handlers or message queue consumers to receive commands Tenant filtering on every query Retry logic, idempotency checks, concurrency controls Then you repeat this for every entity. The business logic — the part that actually matters — is a thin layer inside a thick shell of infrastructure glue.…

Continue reading — create a free account

Join HashtagPLUS to read full articles, follow hashtags, vote, and join the conversation.

Read More