GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com β€” GitHub - DavidVujic/python-polylith: Tooling support for the Polylith Architecture in Python.

BranchesTags
Open more actions menu

Latest commit

 

History

287 Commits
287 Commits

Folders and files

NameName
Last commit message
Last commit date
.agents/skills/polylith
.agents/skills/polylith
 
 
.circleci
.circleci
 
 
.github
.github
 
 
bases/polylith
bases/polylith
 
 
components/polylith
components/polylith
 
 
development
development
 
 
projects
projects
 
 
test
test
 
 
.flake8
.flake8
 
 
.gitignore
.gitignore
 
 
CODE-OF-CONDUCT.md
CODE-OF-CONDUCT.md
 
 
CONTRIBUTING.md
CONTRIBUTING.md
 
 
LICENSE
LICENSE
 
 
README.md
README.md
 
 
mypy.ini
mypy.ini
 
 
poetry.lock
poetry.lock
 
 
poetry.toml
poetry.toml
 
 
pyproject.toml
pyproject.toml
 
 
workspace.toml
workspace.toml
 
 

Repository files navigation

✨ Python tools for the Polylith Architecture ✨

A repo containing tooling support for the Polylith Architecture in Python.

The main use case is to support having one or more microservices (or apps) in a Monorepo, and share code between the services.

DavidVujic

CodeScene Average Code Health

Quality Gate Status

Download Stats

Download Stats

What's Polylith? πŸ€”

... Polylith is a software architecture that applies functional thinking at the system scale. It helps us build simple, maintainable, testable, and scalable backend systems. ... (from the Polylith Architecture docs)

Polylith is an architecture, with tooling support, that was originally built for Clojure. This repo brings Polylith to Python.

Polylith is using a components-first architecture. You can think of it as building blocks, very much like LEGO bricks. All code lives in a Monorepo, available for reuse. Python code - the bricks - is separated from the infrastructure and the actual building of artifacts.

Use cases

Microservices and apps πŸ‘

The main use case is to support having one or more microservices (or apps) in a Monorepo, and share code between the services.

Libraries

Polylith for Python has support for building libraries to be published at PyPI, even if it isn't the main use case. More details about how to package libraries in the docs about Packaging & deploying.

Documentation πŸ“š

Have a look at the Python-specific documentation. You will find installation, setup, usage guides, examples and more.

Python Monorepos with Polylith 🐍

You can use Polylith with Poetry, Hatch, PDM, Rye, Maturin, Pixi, uv and Pantsbuild. This repo contains a Poetry plugin, a standalone CLI and build hooks.

  • a Poetry Plugin
  • a CLI
  • a Hatch Build Hook
  • a PDM Build Hook for projects
  • a PDM Build Hook for the workspace

The Poetry plugin adds tooling support to Poetry. The CLI adds tooling support for several Package & Dependency Managers (such as Hatch, PDM, Rye, Maturin, Pixi and uv).

The Hatch Build Hook adds build-specific support (also for uv, Rye, Pixi and Pantsbuild, using hatchling as the build backend). The PDM Build Hook for projects adds build-specific support for PDM. The PDM Build Hook for the workspace makes the virtual environment aware of the way Polylith organizes code (i.e. the bases and components folders).

✨ Examples and Production systems ✨

There's example Polylith repositories for:

  • Poetry
  • Hatch
  • PDM
  • Rye
  • Pants
  • uv

The repositories are example Python setups of the Polylith Architecture. You will find examples of sharing code between different kind of projects, and developer tooling setup such as mypy and the venv.

There's more examples and production systems in the documentation.

Videos

Talks

  • PyData Amsterdam 2025 - The Gentle Monorepo (about 35 minutes with Q&A)
  • FOSDEM 2025 - Python Monorepos: The Polylith Developer Experience (about 27 minutes with Q&A)
  • PyCon DE & PyData Berlin 2024 - Python Monorepos: The Polylith Developer Experience (about 29 minutes)
  • Python Web Conference 2023 - Microservices, Monolith, Monorepos: the differences & how nicely Polylith solves the trade offs - A Fresh Take on Monorepos in Python (about 36 minutes)

Guides

  • Python with the Polylith Architecture - an overview (about 15 minutes)
  • Python Poetry Polylith Plugin - the tooling support & commands (about 13 minutes)
  • The Developer Experience
    • developing a Dad Joke Service with Polylith (about 27 minutes)
    • the Polylith Dev Experience using Hatch and Rye (about 7 minutes)
  • The standalone Polylith CLI - An intro to the polylith-cli - tooling support for Polylith with Python and Hatch

Podcasts

  • Talk Python To Me: Monorepos in Python

Articles

  • The last Python Architecture you will ever need?
  • A Fresh Take on Monorepos in Python
  • A simple & scalable Python project structure
  • Aws CDK App with polylith code architecture by Yoel BenΓ­tez Fonseca
  • GCP Cloud Functions with Python and Polylith
  • Python FastAPI Microservices with Polylith
  • Kafka messaging with Python & Polylith
  • Runestone Monorepo and Server Structure by Minh-Thao Pham
  • Python Monorepo Visualization
  • Simple Kubernetes in Python Monorepos
  • Moving all our Python code to a monorepo: pytendi by Omar Elbaghdadi

Repo Visualization

A visualization of this repo (that itself is a Polylith workspace) using the poly info command.

poly-info

About

Tooling support for the Polylith Architecture in Python.

davidvujic.github.io/python-polylith-docs/

Topics

architecturehatchhatch-pluginhatchlingmaturinmonorepopantspantsbuildpdmpdm-pluginpixipoetrypoetry-pluginpolylithpythonpython-hatchpython-poetryryeuv

Resources

Readme
MIT license

Code of conduct

Code of conduct

Contributing

Contributing
Activity

Stars

557 stars

Watchers

9 watching

Forks

32 forks
Report repository

Releases

Sponsor this project

Used by

Contributors

Languages

You are visitor 01402503 β€” GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800Γ—600. No cookies required.