python-architecture

Automate Python application architecture design with domain-driven patterns.

6|Updated Feb 25, 2026
One-click install
npx skills add https://github.com/archibate/archibate-skills --skill python-architecture-archibate
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: python-architecture
Source: https://github.com/archibate/archibate-skills/tree/main/old-skills/minor-skills/python-architecture
Command: npx skills add https://github.com/archibate/archibate-skills --skill python-architecture-archibate

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

This Skill helps developers design Python applications with a clean separation between pure business logic and IO, enabling maintainable, testable code and scalable architectures.

Core Features & Use Cases

  • Domain-driven design patterns: entities, value objects, aggregates, repositories
  • Functional core / imperative shell guidance: pure functions for business logic, thin orchestration for IO
  • Data modeling patterns for API and persistence (from_request, to_response, from_record, to_record)
  • Practical guidance for layering, testing strategies, and bounded contexts

Quick Start

Create a small domain example using a dataclass entity, a Pydantic input/output model, and a repository interface to demonstrate end-to-end flow.

Frequently Asked Questions about python-architecture

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I structure a Python application using domain-driven design patterns?

Structure Python applications using domain-driven design by defining entities, value objects, aggregates, and repository interfaces. This approach enforces clean separation of concerns, isolating pure business logic from IO operations to improve maintainability and testability.

What is the functional core / imperative shell pattern in Python architecture?

The functional core / imperative shell pattern in Python architecture separates pure functions for business logic from thin orchestration layers handling IO. This design ensures domain logic remains side-effect free, making code highly testable and scalable.

How do I map data between API requests, domain models, and database records in Python?

Map data between API requests, domain models, and database records in Python using from_request, to_response, from_record, and to_record transformations. These data modeling patterns cleanly translate Pydantic input/output models to internal dataclass entities.

Does this Python architecture guidance support refactoring existing projects?

Yes, the Python architecture guidance supports refactoring existing projects by guiding developers through layering, validation, and bounded contexts. It helps enforce clean separation of concerns during project setup and generates architectural documentation.

How do I start building a clean architecture Python project from scratch?

Start building a clean architecture Python project by creating a small domain example with a dataclass entity, a Pydantic input/output model, and a repository interface. This demonstrates end-to-end flow from request handling to persistence.

When should I use bounded contexts in Python application architecture?

Use bounded contexts in Python application architecture when scaling complex domains to maintain clean separation of concerns. They provide practical guidance for isolating domain models and testing strategies within specific business boundaries.