Skip to main content

How it compares

Before settling the structure we looked at the Python repositories people actually reach for, and at the most-starred templates in other ecosystems to see what drives adoption. Snapshot as of September 2026.

Python Clean Architecture / DDD repositories

RepositoryStarsStrongWeakKept / avoided here
cosmicpython/code2.7kRepository, UoW, message bus explained by a book; tests split by levelFlask, sync, Python 3.8, no typingkept the test split; avoided the service-layer-without-ports shape
pgorecki/python-ddd1kevent storming, context maps, bloga DDD project, not a template; WIPavoided multi-context scope
iktakahiro/dddpy730didactic README with curl; frozen value objects; Depends as DITODO domain too thin; no events; no architecture testskept Depends-only DI and curl examples
ivan-borovets/fastapi-clean-example589no globals, UoW done right, uv/ruff/mypy/AlembicREADME "refactor in progress", incomplete testskept the tooling bar; avoided CQRS + RBAC + sessions in a template
0xTheProDev/fastapi-clean-example510REST + GraphQLmodels/crud/services layering, not Clean Architecture; unmaintained-
qu3vipon/python-ddd456imperative SQLAlchemy mappingno tests; heavy DI libraryavoided dependency-injector
lgiordani/rentomatic421free book "Clean Architectures in Python"2018-era tooling-
BrunoTanabe/fastapi-clean-architecture-ddd-template23feature-first modules with four rings; module scaffold script; step-by-step "replace the domain"pytest not even a dependency; nine modules + JWT + Rediskept feature-first + scaffold; avoided the scope
bodaue/fastapi-clean-architecture31main/ as composition rootDishka + Poetry, no testskept an explicit composition root

Common gap: none of those we reviewed combine executable boundary tests (import-linter exists and some projects use it, but rarely with the rest), a realistic-but-small domain, a navigable explanation of the request flow, a verified domain-replacement procedure and all five test levels. The most-starred are books or "refactor in progress".

What the most-starred templates elsewhere teach

TemplateStarsLesson applied
jasontaylordev/CleanArchitecture (.NET)20kbadges + 3-command start at the top; "architectural decisions" section; multi-DB via option
ardalis/CleanArchitecture (.NET)18kDesign decisions and dependencies explained, e.g. where validation goes → our ADRs
bulletproof-react36kdocs-first; "not a framework"; principles stated up-front; sample app separate from guidelines
create-t3-app29kopinionated but modular: each piece optional → recipes instead of baked-in features
cookiecutter-django14kproject rename on init; 100 % starting coverage; Dependabot → init_project.py
brocoders/nestjs-boilerplate4kresource generator; DB chosen by env → new_feature.py, DATABASE_URL
fastapi/full-stack-fastapi-template46kthe DX bar: uv, compose, CI, "Use this template" (its layering is flat by design)

What we saw fail: READMEs that say "docs coming", patterns present but unexplained, empty test scaffolds, and templates whose understanding depends on a paid course.

Why choose this one

Boundaries verified by tests that run in CI, an example domain removed with one command, and a written reason for every pattern present - or absent. We have not found another Python template that does all three; if you know one, open an issue and we will link it.