Skip to content

thatsed/python-polylith

 
 

Repository files navigation

✨ Python tools for the Polylith Architecture ✨

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

DavidVujic

CodeScene Code Health

Quality Gate Status

Download Stats

What's Polylith? 🤔

Polylith is an architecture (with tooling support) originally built for Clojure. The code in this repo brings Polylith to Python.

From the official Polylith Architecture docs:

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

Polylith is using a components-first architecture. Similar to LEGO, components are building blocks. A component can be shared across apps, serverless functions and microservices.

Documentation 📚

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

Polylith for Python? 🐍

This repo contains a Poetry plugin, a CLI that enables support for Hatch and a Hatch Build Hook plugin. Both can be installed from PyPI:

The Poetry plugin adds Polylith specific tooling support to Poetry. The CLI adds tooling support for Polylith, and enables different kinds of Package & Dependency Management tools (such as Hatch). The Hatch Build Hook adds support for building Libraries from Polylith with Hatch.

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.

✨ Examples ✨

Have a look at the Python Polylith Examples repository.

There is also a Python Polylith Examples with Hatch repository.

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.

Videos

Talks

  • 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)

Podcasts

Articles

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.

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Python 100.0%