Skip to main content

Module polylith

Module polylith 

Source
Expand description

Polylith architecture support

Polylith is a software architecture that applies functional thinking to the system level, organizing code into:

  • bases/: Entry points (CLI, web server, Lambda handler, etc.)
  • components/: Reusable building blocks with well-defined interfaces
  • projects/: Deployable artifacts that combine bases and components
workspace/
├── bases/
│   └── myapp-cli/           # CLI entry point
│       ├── pyproject.toml
│       └── src/myapp_cli/
├── components/
│   ├── user/                # User component
│   │   ├── pyproject.toml
│   │   └── src/user/
│   └── database/            # Database component
│       ├── pyproject.toml
│       └── src/database/
├── projects/
│   └── myapp/               # Deployable project
│       └── pyproject.toml   # Combines base + components
└── pyproject.toml           # Workspace root

Benefits:

  • Clear separation of concerns
  • High code reuse across projects
  • Independent testing of components
  • Easy to reason about dependencies

Structs§

Brick
A Polylith brick (base, component, or project)
Polylith
Polylith workspace configuration

Enums§

BrickType
Polylith brick types