Presenting to you a Python cookiecutter for fast starting with polylith in Python. If you do not know what polylith is read the documentation , for the impatient reader:
Polylith is a software architecture that aims to build simple, maintainable, testable, and scalable backend systems. It does this by applying functional thinking at the system scale, treating code as building blocks that can be combined into features.
And python-polylith is the tool that allow us to implement this in Python.
I won't go into details about the advantages of this approach. In this article I introduce you to poetry-poly-cc, a highly opinionated cookiecutter for starting a project with python-polylith.
You can start by installing cookiecutter and generating a project with:
cookiecutter https://github.com/ybenitezf/poetry-poly-cc.git
Answer the questions and you are good. You should endup with something like:
. ├── LICENSE ├── README.md ├── bases ├── build-packages.sh ├── components ├── development │ └── __init__.py ├── poetry.toml ├── projects ├── pyproject.toml ├── update-locks.sh └── workspace.toml
The firsts steps are included in the README.md:
Run
git init poetry install # install pre-commit hook poetry run pre-commit install # install pre-commit dependencies poetry run pre-commit run -a
The above is the detailed content of Cookiecutter for fast starting with polylith. For more information, please follow other related articles on the PHP Chinese website!