Overview of pydantic-resolve and Clean Architecture
masterpydantic-resolve is a framework designed to bring Clean Architecture principles to Python web development. It provides a structured way to define business entities, declare relationships via ER Diagrams, and automatically assemble data using Resolvers and Loaders. This approach helps eliminate N+1 query problems by design.
The framework maps directly to the layers of Clean Architecture:
- Enterprise Business Rules: Implemented using
EntityandER Diagram(withAutoLoad). - Application Business Rules: Implemented using
Resolvermethods (resolve_*andpost_*). - Interface Adapters: Implemented using
Loaderfor data access. - Framework & Interface: Implemented using
Responseand web framework integrations like FastAPI, GraphQL, or MCP.