Modern Python Boilerplate – good package basic structure
TL;DR: Python Boilerplate repo for fast package building with all best practices
Hello,
I wanted to share a small repository I made named “Modern Python Boilerplate”. I created it because I saw in multiple projects including in professional environnement, the lack of good structure and practice, leading to ugly code or even non-functional, environnement mess…
The goal is to provide a python repository setup that provides all the best good-practices tool available and pre-configure them. It makes it easy to build and publish python package !
The link is here https://github.com/lambda-science/modern-python-boilerplate
It include (in a single Makefile !) modern python management (structure, packaging, version and deps w/ UV), modern CI (listing, formatting, type checking, testing, coverage, pre-commit hooks w/ Ruff/Ty), documentation (automatic API Reference building and publishing on Github/Gitlab w/ Mkdocs) and running (basic Dockerfile, Makefile, DevContainer tested on Pycharm, module running as a terminal command…)
Don’t hesitate to share feedback or comments on this, what could be improved.
I heard for example that some people hate pre-commit hooks, so I just kept it to the straight minimum of checking/re-formatting code.
So, It's like Cookiecutter, right? https://github.com/cookiecutter/cookiecutter
Yes. However, cookiecutter is the tool.
It would be nice if the repo was made into a cookiecutter template.
https://cookiecutter.readthedocs.io/en/latest/tutorials/
In docker do you run uv inside the container to handle your deps in production?
[flagged]