{"id":17341041,"url":"https://github.com/davidvujic/python-polylith","last_synced_at":"2026-04-18T16:07:40.294Z","repository":{"id":43495376,"uuid":"453143884","full_name":"DavidVujic/python-polylith","owner":"DavidVujic","description":"Tooling support for the Polylith Architecture in Python.","archived":false,"fork":false,"pushed_at":"2026-02-09T23:22:26.000Z","size":982,"stargazers_count":535,"open_issues_count":2,"forks_count":32,"subscribers_count":9,"default_branch":"main","last_synced_at":"2026-02-10T04:22:43.164Z","etag":null,"topics":["architecture","hatch","hatch-plugin","hatchling","maturin","monorepo","pants","pantsbuild","pdm","pdm-plugin","pixi","poetry","poetry-plugin","polylith","python","python-hatch","python-poetry","rye","uv"],"latest_commit_sha":null,"homepage":"https://davidvujic.github.io/python-polylith-docs/","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/DavidVujic.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":".github/FUNDING.yml","license":"LICENSE","code_of_conduct":"CODE-OF-CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null},"funding":{"github":"davidvujic"}},"created_at":"2022-01-28T16:45:17.000Z","updated_at":"2026-02-09T23:17:16.000Z","dependencies_parsed_at":"2023-02-17T08:45:21.869Z","dependency_job_id":"cd8cdc73-6d00-4c13-be8f-d752c7449080","html_url":"https://github.com/DavidVujic/python-polylith","commit_stats":{"total_commits":75,"total_committers":3,"mean_commits":25.0,"dds":"0.040000000000000036","last_synced_commit":"91504ee24e5415f2e3b118ad4ea2b51e2f586e9b"},"previous_names":["davidvujic/poetry-polylith-plugin"],"tags_count":134,"template":false,"template_full_name":null,"purl":"pkg:github/DavidVujic/python-polylith","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/DavidVujic%2Fpython-polylith","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/DavidVujic%2Fpython-polylith/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/DavidVujic%2Fpython-polylith/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/DavidVujic%2Fpython-polylith/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/DavidVujic","download_url":"https://codeload.github.com/DavidVujic/python-polylith/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/DavidVujic%2Fpython-polylith/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29480862,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-15T11:35:25.641Z","status":"ssl_error","status_checked_at":"2026-02-15T11:34:57.128Z","response_time":118,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["architecture","hatch","hatch-plugin","hatchling","maturin","monorepo","pants","pantsbuild","pdm","pdm-plugin","pixi","poetry","poetry-plugin","polylith","python","python-hatch","python-poetry","rye","uv"],"created_at":"2024-10-15T15:47:34.756Z","updated_at":"2026-02-15T14:02:28.518Z","avatar_url":"https://github.com/DavidVujic.png","language":"Python","readme":"# :sparkles: Python tools for the Polylith Architecture :sparkles:\n\nA repo containing tooling support for the Polylith Architecture in Python.\n\nThe main use case is to support having one or more microservices (or apps) in a Monorepo, and share code between the services.\n\n[![DavidVujic](https://circleci.com/gh/DavidVujic/python-polylith.svg?style=svg)](https://app.circleci.com/pipelines/github/DavidVujic/python-polylith?branch=main\u0026filter=all)\n\n[![CodeScene Code Health](https://codescene.io/projects/36630/status-badges/code-health)](https://codescene.io/projects/36630)\n\n[![Quality Gate Status](https://sonarcloud.io/api/project_badges/measure?project=DavidVujic_python-polylith\u0026metric=alert_status)](https://sonarcloud.io/summary/new_code?id=DavidVujic_python-polylith)\n\n[![Download Stats](https://img.shields.io/pypi/dm/poetry-polylith-plugin?label=Poetry%20plugin%20Downloads)](https://pypistats.org/packages/poetry-polylith-plugin)\n\n[![Download Stats](https://img.shields.io/pypi/dm/polylith-cli?label=CLI%20Downloads)](https://pypistats.org/packages/polylith-cli)\n\n\n## What's Polylith? :thinking:\n\u003e... Polylith is a software architecture that applies functional thinking at the system scale. It helps us build simple, maintainable, testable, and scalable backend systems. ...\n(from the [Polylith Architecture docs](https://polylith.gitbook.io/polylith/))\n\nPolylith is an architecture, with tooling support, that was originally built for Clojure.\nThis repo brings __Polylith to Python__.\n\nPolylith is using a components-first architecture.\nYou can think of it as building blocks, very much like LEGO bricks.\nAll code lives in a Monorepo, available for reuse.\nPython code - the bricks - is separated from the infrastructure and the actual building of artifacts.\n\n### Use cases\n\n#### Microservices and apps :thumbsup:\nThe main use case is to support having one or more microservices (or apps) in a Monorepo, and share code between the services.\n\n#### Libraries\nPolylith for Python has support for building libraries to be published at PyPI, even if it isn't the main use case.\nMore details about how to package libraries in the docs about [Packaging \u0026 deploying](https://davidvujic.github.io/python-polylith-docs/deployment/#packaging-a-library).\n\n## Documentation :books:\nHave a look at the [Python-specific documentation](https://davidvujic.github.io/python-polylith-docs/).\nYou will find installation, setup, usage guides, examples and more.\n\n## Python Monorepos with Polylith :snake:\nYou can use Polylith with Poetry, Hatch, PDM, Rye, Maturin, Pixi, uv and Pantsbuild.\nThis repo contains a Poetry plugin, a standalone CLI and build hooks.\n\n* [a Poetry Plugin](https://pypi.org/project/poetry-polylith-plugin)\n* [a CLI](https://pypi.org/project/polylith-cli)\n* [a Hatch Build Hook](https://pypi.org/project/hatch-polylith-bricks/)\n* [a PDM Build Hook for projects](https://pypi.org/project/pdm-polylith-bricks/)\n* [a PDM Build Hook for the workspace](https://pypi.org/project/pdm-polylith-workspace/)\n\nThe Poetry plugin adds tooling support to Poetry.\nThe CLI adds tooling support for several Package \u0026 Dependency Managers (such as Hatch, PDM, Rye, Maturin, Pixi and uv).\n\nThe Hatch Build Hook adds build-specific support (also for uv, Rye, Pixi and Pantsbuild, using hatchling as the build backend).\nThe PDM Build Hook for _projects_ adds build-specific support for PDM.\nThe PDM Build Hook for the _workspace_ makes the virtual environment aware of the way Polylith organizes code (i.e. the bases and components folders).\n\n## :sparkles: Examples and Production systems :sparkles:\nThere's example Polylith repositories for:\n- [Poetry](https://github.com/DavidVujic/python-polylith-example)\n- [Hatch](https://github.com/DavidVujic/python-polylith-example-hatch)\n- [PDM](https://github.com/DavidVujic/python-polylith-example-pdm)\n- [Rye](https://github.com/DavidVujic/python-polylith-example-rye)\n- [Pants](https://github.com/DavidVujic/python-polylith-example-pants)\n- [uv](https://github.com/DavidVujic/python-polylith-example-uv)\n\nThe repositories are example __Python__ setups of the Polylith Architecture.\nYou will find examples of sharing code between different kind of projects,\nand developer tooling setup such as `mypy` and the `venv`.\n\nThere's __more examples__ and production systems in the [documentation](https://davidvujic.github.io/python-polylith-docs/examples/).\n\n## Videos\n\n### Talks\n- __PyData Amsterdam 2025__ - [The Gentle Monorepo](https://youtu.be/k49496sH9aw) (about 35 minutes with Q\u0026A)\n- __FOSDEM 2025__ - [Python Monorepos: The Polylith Developer Experience](https://youtu.be/vtJS2O_P0ek?si=9P97dsisqn74V25R) (about 27 minutes with Q\u0026A)\n- __PyCon DE \u0026 PyData Berlin 2024__ - [Python Monorepos: The Polylith Developer Experience](https://youtu.be/wGWjt9GJLU4?si=1nOpThiwayc4Crvm) (about 29 minutes)\n- __Python Web Conference 2023__ - Microservices, Monolith, Monorepos: the differences \u0026 how nicely Polylith solves the trade offs - [A Fresh Take on Monorepos in Python](https://youtu.be/HU61vjZPPfQ) (about 36 minutes)\n\n### Guides\n- Python with the Polylith Architecture - [an overview](https://youtu.be/3w2ffHZb6gc) (about 15 minutes)\n- Python Poetry Polylith Plugin - [the tooling support \u0026 commands](https://youtu.be/AdKpTP9pjHI) (about 13 minutes)\n- The Developer Experience\n    - [developing a Dad Joke Service with Polylith](https://youtu.be/oG4OFEer3Tk) (about 27 minutes)\n    - [the Polylith Dev Experience using Hatch and Rye](https://youtu.be/BXPQBXuiRwM?si=rQ70ESrY-hRDazBi) (about 7 minutes)\n- The standalone Polylith CLI - [An intro to the polylith-cli - tooling support for Polylith with Python and Hatch](https://youtu.be/K__3Uah3by0)\n\n## Podcasts\n- __Talk Python To Me__: [Monorepos in Python](https://talkpython.fm/episodes/show/399/monorepos-in-python)\n\n## Articles\n- [The last Python Architecture you will ever need?](https://davidvujic.blogspot.com/2022/11/the-last-python-architecture-you-will-ever-need.html)\n- [A Fresh Take on Monorepos in Python](https://davidvujic.blogspot.com/2022/02/a-fresh-take-on-monorepos-in-python.html)\n- [A simple \u0026 scalable Python project structure](https://davidvujic.blogspot.com/2022/08/a-simple-scalable-python-project.html)\n- [Aws CDK App with polylith code architecture](https://dev.to/ybenitezf/aws-cdk-app-with-polylith-code-architecture-30e3) by Yoel Benítez Fonseca\n- [GCP Cloud Functions with Python and Polylith](https://davidvujic.blogspot.com/2023/07/gcp-cloud-functions-with-python-and-polylith.html)\n- [Python FastAPI Microservices with Polylith](https://davidvujic.blogspot.com/2023/07/python-fastapi-microservices-with-polylith.html)\n- [Kafka messaging with Python \u0026 Polylith](https://davidvujic.blogspot.com/2023/08/kafka-messaging-with-python-and-polylith.html)\n- [Runestone Monorepo and Server Structure](https://medium.com/@thaopham03/runestone-monorepo-and-server-structure-0754dbc52f48) by Minh-Thao Pham\n- [Python Monorepo Visualization](https://davidvujic.blogspot.com/2024/02/python-monorepo-visualization.html)\n- [Simple Kubernetes in Python Monorepos](https://davidvujic.blogspot.com/2024/08/simple-kubernetes-in-python-monorepos.html)\n- [Moving all our Python code to a monorepo: pytendi](https://attendi.nl/moving-all-our-python-code-to-a-monorepo-pytendi/) by Omar Elbaghdadi\n\n## Repo Visualization\nA visualization of this repo (that itself is a Polylith workspace) using the `poly info` command.\n\n\u003cimg width=\"698\" alt=\"poly-info\" src=\"https://github.com/DavidVujic/python-polylith/assets/301286/692581b6-e5ad-48b4-8fac-9a2aac83942f\"\u003e\n\n","funding_links":["https://github.com/sponsors/davidvujic"],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdavidvujic%2Fpython-polylith","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdavidvujic%2Fpython-polylith","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdavidvujic%2Fpython-polylith/lists"}