What problem does it solve?
Cosmic Python provides a disciplined blueprint for building Python services with a four-layer architecture (models, adapters, services, entrypoints). It emphasizes clean separation of concerns, SOLID adherence, and testability to reduce maintenance headaches and WTFs per minute during code reviews.
Core Features & Use Cases
- Four-layer architecture: models (domain), adapters (infrastructure), services (use-cases), entrypoints (APIs/CLI).
- Dependency Direction Principle (DIP) enforced to prevent high-level policies from depending on low-level implementations.
- Layered testing guidance: unit tests for models, mocks for adapters, orchestrated service tests, and contract tests for entrypoints.
- Observability and CI/CD guidance integrated to maintain architectural discipline over time.
- Relevant for teams adopting Clean Code and Clean Architecture practices to scale Python systems.
Quick Start
Initialize a new Python project with a four-folder skeleton (models/, adapters/, services/, entrypoints/), add a SKILL.md frontmatter, and start with a minimal domain model in models/. Then implement a small service that orchestrates a mock adapter and expose a basic entrypoint, followed by CI/testing configuration.