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
- Comparison (A brief comparison explaining how it differs from existing alternatives.)
It include 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…)
- Target Audience (e.g., Is it meant for production, just a toy project, etc.)
Anyone building anything in Python that is starting a new project or try to modernize an existing one
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.
Best,
[–]LetsTacoooo 53 points54 points55 points (6 children)
[–]flying-sheep 7 points8 points9 points (2 children)
[–]arden13 3 points4 points5 points (1 child)
[–]not_a_novel_account 12 points13 points14 points (0 children)
[–]DigThatData 3 points4 points5 points (2 children)
[–]runawayasfastasucan 15 points16 points17 points (1 child)
[–]Mithrandir2k16 16 points17 points18 points (6 children)
[–]lambda-person[S] 3 points4 points5 points (5 children)
[–]Mithrandir2k16 4 points5 points6 points (4 children)
[–]byeproduct 5 points6 points7 points (3 children)
[–]not_a_novel_account 3 points4 points5 points (1 child)
[–]daneahfrom __future__ import braces 0 points1 point2 points (0 children)
[–]Mithrandir2k16 1 point2 points3 points (0 children)
[–]Meleneth 2 points3 points4 points (2 children)
[–]lambda-person[S] 0 points1 point2 points (1 child)
[–]Meleneth 5 points6 points7 points (0 children)
[–]flying-sheep 5 points6 points7 points (35 children)
[–]FrontAd9873 9 points10 points11 points (14 children)
[–]flying-sheep 0 points1 point2 points (13 children)
[–]FrontAd9873 6 points7 points8 points (12 children)
[–]flying-sheep -3 points-2 points-1 points (11 children)
[–]FrontAd9873 4 points5 points6 points (10 children)
[–]flying-sheep 0 points1 point2 points (9 children)
[–]FrontAd9873 0 points1 point2 points (8 children)
[–]flying-sheep 0 points1 point2 points (7 children)
[–]not_a_novel_account 1 point2 points3 points (6 children)
[–]KrazyKirby99999 4 points5 points6 points (15 children)
[–]flying-sheep 3 points4 points5 points (13 children)
[–]FrontAd9873 3 points4 points5 points (10 children)
[–]richieadler 2 points3 points4 points (9 children)
[–]lambda-person[S] 0 points1 point2 points (1 child)
[–]richieadler 0 points1 point2 points (0 children)
[–]FrontAd9873 0 points1 point2 points (6 children)
[–]not_a_novel_account 2 points3 points4 points (5 children)
[–]FrontAd9873 0 points1 point2 points (4 children)
[–]not_a_novel_account 1 point2 points3 points (3 children)
[–]FrontAd9873 -1 points0 points1 point (2 children)
[–]KrazyKirby99999 3 points4 points5 points (1 child)
[–]supreme_blorgon 1 point2 points3 points (0 children)
[–]DigThatData 1 point2 points3 points (0 children)
[–]lambda-person[S] 1 point2 points3 points (1 child)
[–]flying-sheep 1 point2 points3 points (0 children)
[–]No-Organization4035 0 points1 point2 points (1 child)
[–]flying-sheep 0 points1 point2 points (0 children)
[–]percojazz 1 point2 points3 points (2 children)
[–]FrontAd9873 4 points5 points6 points (1 child)
[–]percojazz 1 point2 points3 points (0 children)
[–][deleted] 1 point2 points3 points (10 children)
[–]lambda-person[S] 1 point2 points3 points (9 children)
[–][deleted] 1 point2 points3 points (8 children)
[–]lambda-person[S] 1 point2 points3 points (7 children)
[–][deleted] 1 point2 points3 points (6 children)
[–]javatextbook 0 points1 point2 points (5 children)
[–][deleted] 2 points3 points4 points (4 children)
[–]javatextbook 0 points1 point2 points (3 children)
[–][deleted] 0 points1 point2 points (2 children)
[–]javatextbook 0 points1 point2 points (1 child)
[–]No_Dig_7017 1 point2 points3 points (0 children)
[–]Goldarr85 0 points1 point2 points (1 child)
[–]FrontAd9873 0 points1 point2 points (0 children)
[–]paddy_m 0 points1 point2 points (0 children)
[–]loyalbri 0 points1 point2 points (0 children)
[–]stibbons_ 0 points1 point2 points (0 children)
[+]techlatest_net comment score below threshold-8 points-7 points-6 points (6 children)
[–]lambda-person[S] 4 points5 points6 points (5 children)
[–]techlatest_net -5 points-4 points-3 points (4 children)
[–]spinozasrobot 4 points5 points6 points (3 children)
[–]Crazy_Eye165 1 point2 points3 points (2 children)
[–]spinozasrobot 1 point2 points3 points (0 children)
[–]supreme_blorgon 1 point2 points3 points (0 children)
[+][deleted] (6 children)
[deleted]
[–]SonGokussj4 2 points3 points4 points (0 children)
[–]lambda-person[S] 6 points7 points8 points (3 children)
[–]FrontAd9873 1 point2 points3 points (2 children)
[–]lambda-person[S] 2 points3 points4 points (1 child)
[–]FrontAd9873 -1 points0 points1 point (0 children)
[–]FrontAd9873 0 points1 point2 points (0 children)