Python tooling support for the Polylith Architecture
Project description
Python tooling for Polylith
A command line interface that adds tooling support for the Polylith Architecture in Python.
Documentation
Have a look at the documentation. You will find installation, setup, usage guides and more.
Quick start
Poetry
user? For Poetry, the recommended setup is to install the poetry-polylith-plugin
.
Read more about Poetry in the documentation.
Setup: Hatch
Create a directory for your code, initialize it with git and setup the basics with hatch
:
git init
hatch new --init
Add the Polylith CLI as a dev dependency in pyproject.toml
:
[tool.hatch.envs.default]
dependencies = ["polylith-cli"]
Add configuration for a local virtual environment in the pyproject.toml
:
[tool.hatch.envs.default]
type = "virtual"
path = ".venv"
python = "3.12" # your preferred version here
Make Hatch
aware of the Polylith structure, by adding this to the pyproject.toml
:
[tool.hatch.build]
dev-mode-dirs = ["components", "bases", "development", "."]
Next: create a Polylith workspace, with a basic Polylith folder structure.
The poly
command is now available in the local virtual environment.
You can run commands in the context of hatch run
to make Polylith aware of the development environment.
hatch run poly create workspace --name my_namespace --theme loose
Ready for coding!
Add components, bases and projects:
hatch run poly create component --name my_component
hatch run poly create base --name my_example_endpoint
hatch run poly create project --name my_example_project
For details, have a look at the documentation. There, you will find guides for setup, migration, packaging, available commands, code examples and more.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Hashes for polylith_cli-0.5.0-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 730488786457c1d50fea598eb383c8473a81811ffbe7e2b81c603d127abed94c |
|
MD5 | b90c93812a48310202009a8a153a9dd8 |
|
BLAKE2b-256 | ef9f4027f77eff5e0f7d8d57641dd9dafb0501d6990d0f79f44eecf0e250139d |