Comprehensive guide for production-ready Python backend development and software architecture at scale. Use when designing APIs, building backend services, creating microservices, structuring Python projects, implementing database patterns, writing async code, or any Python backend/server-side development task. Covers Clean Architecture, Domain-Driven Design, Event-Driven Architecture, FastAPI/Django patterns, database design, caching strategies, observability, security, testing strategies, and deployment patterns for high-scale production systems.
설치
Codex 또는 Claude로 설치 이 Prompt를 복사해 Codex, Claude 또는 다른 어시스턴트에 붙여 넣으면 Skill 페이지를 검토하고 설치를 진행할 수 있습니다.
Comprehensive guide for production-ready Python backend development and software architecture at scale. Use when designing APIs, building backend services, creating microservices, structuring Python projects, implementing database patterns, writing async code, or any Python backend/server-side development task. Covers Clean Architecture, Domain-Driven Design, Event-Driven Architecture, FastAPI/Django patterns, database design, caching strategies, observability, security, testing strategies, and deployment patterns for high-scale production systems.
Python Backend Architecture
Production-ready patterns for Python backend systems following Clean Architecture, Domain-Driven Design, and modern distributed system patterns.
Dependency Rule: Dependencies point inward. Domain has no external dependencies.
Key Principles
Dependency Injection - Depend on abstractions, not implementations
Single Responsibility - One reason to change per class/function
Explicit over Implicit - No hidden dependencies or magic
Async by Default - Use async/await for all I/O operations
Type Hints Everywhere - All public APIs fully typed
Immutability - Prefer immutable data structures (especially value objects)
Early Return - Reduce nesting with guard clauses
Architecture Decision Flowchart
flowchart TD
A[New Feature] --> B{Complex domain logic?}
B -->|Yes| C[Use Domain-Driven Design]
B -->|No| D{Multiple data sources?}
C --> E[Define Entities & Value Objects]
E --> F[Create Repository Interfaces]
F --> G[Implement Use Cases]
D -->|Yes| H[Use Repository Pattern]
D -->|No| I{Transaction across aggregates?}
H --> G
I -->|Yes| J[Use Unit of Work]
I -->|No| K[Direct repository calls]
J --> G
K --> G
G --> L{Cross-service operation?}
L -->|Yes| M[Use Saga Pattern]
L -->|No| N[Single transaction]
M --> O[Publish Domain Events]
N --> O
O --> P{Needs real-time updates?}
P -->|Yes| Q[Event-Driven Architecture]
P -->|No| R[Request-Response]