Metadata-Version: 2.4
Name: polylith-cli
Version: 1.55.1
Summary: Python tooling support for the Polylith Architecture
License-Expression: MIT
Author: David Vujic
Requires-Python: >=3.10
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Programming Language :: Python :: 3.13
Classifier: Programming Language :: Python :: 3.14
Classifier: Programming Language :: Python :: 3.15
Requires-Dist: pyyaml
Requires-Dist: rich
Requires-Dist: tomlkit
Requires-Dist: typer
Requires-Dist: typing_extensions
Project-URL: Documentation, https://davidvujic.github.io/python-polylith-docs
Project-URL: Repository, https://github.com/davidvujic/python-polylith
Description-Content-Type: text/markdown

# Python tooling for Polylith

A command line interface that adds tooling support for the Polylith Architecture in Python. Use it with your favorite _Packaging & Dependency management_ tool (_uv_, _Poetry_, _Hatch_, _PDM_, _Pixi_, _Maturin_ and others).

## Documentation
Have a look at the [documentation](https://davidvujic.github.io/python-polylith-docs/).
You will find installation, setup, usage guides and more.

### Not a uv user?
In the [documentation](https://davidvujic.github.io/python-polylith-docs/)  you will find guides for setup, migration, packaging, available commands, code examples and more
for _Poetry_, _Hatch_, _PDM_, _Pixi_, _Maturin_ and others.

## Quick Start for uv users
``` shell
uv init my_repo  # name your repo

cd my_repo

uv add polylith-cli --dev

uv sync  # create a virtual environment and lock files
```

Create a workspace, with a basic Polylith folder structure.

``` shell
uv run poly create workspace --name my_namespace --theme loose
```

### Edit the configuration
The recommended build backend for  uv is Hatch. Make uv (and Hatch) aware of the way Polylith organizes source code:
``` toml
[build-system]
requires = ["hatchling"]
build-backend = "hatchling.build"

[tool.hatch.build]
dev-mode-dirs = ["components", "bases", "development", "."]
```

Run the `sync` command to update the virtual environment:

``` shell
uv sync
```

Finally, remove the `src` boilerplate code that was added by uv in the first step:
``` shell
rm -r src
```

### Ready for coding!

Add components, bases and projects:

``` shell
uv run poly create component --name my_component

uv run poly create base --name my_example_endpoint

uv run poly create project --name my_example_project
```

For details, have a look at the [documentation](https://davidvujic.github.io/python-polylith-docs/).
There, you will find guides for setup, migration, packaging, available commands, code examples and more.

