Generating Python projects using best practices
Project description
Python Whiteprint, generate easily Python projects with (opinionated) best practices.
Documentation: https://python-whiteprint.readthedocs.io/en/latest/
Source Code: https://github.com/RomainBrault/python-whiteprint
Installation
Ensure that you have git and python3 installed.
Then install the required Python tools:
$ python3 -m pip install --user --upgrade pipx
$ pipx install poetry
$ pipx install nox
$ pipx inject nox nox-poetry rich
Eventually install Python Whiteprint:
$ pipx install python-whiteprint
Example
Create a local project
$ whiteprint init <my_project>
Create a GitHub project
$ whiteprint init <my_project> --github-token <my_github_token>
Note that the GitHub token must have repository, workflows and packages permissions.
Yet another Python Project scaffold/cookiecutter/generator?
Yes.
This project build upon the excellents cookiecutter-hypermodern-python by @cjolowicz as well as python-blueprint by @johnthagen.
You might want to check these projects as they might be more suited to your needs.
The documentation of this project is heavily inspired from @cjolowicz's work. We also recommend readings @cjolowicz's guide on modern Python tooling.
Differences compared to cookiecutter-hypermodern-python
- Use copier instead of the cookiecutter project,
- tweaks in the generated project (non exhaustively: CLI with Typer instead of Click, dynamic type checking with beartype, auto-API documentation),
- manage licenses with Reuse,
- more Github Actions and Community Standards and Community Standards,
- Ruff instead of Flake8 to auto-fix a maximum of code smells,
- strict linting with pylint,
- OCI Container images,
- localization with Babel.
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
File details
Details for the file python_whiteprint-0.9.0.tar.gz
.
File metadata
- Download URL: python_whiteprint-0.9.0.tar.gz
- Upload date:
- Size: 26.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.1 CPython/3.11.5
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 9d7396e26787a26a5da893b9d4fa8c5bc63f5b0a8e5f1e42455eb0a1dcd1444a |
|
MD5 | 65fc0a3cfdc3a81d30b89f24de461374 |
|
BLAKE2b-256 | 8fd7d725c78d871d70fd5a5d717fb77599c822a6067aab82ea909e5a376ee88c |
File details
Details for the file python_whiteprint-0.9.0-py3-none-any.whl
.
File metadata
- Download URL: python_whiteprint-0.9.0-py3-none-any.whl
- Upload date:
- Size: 35.3 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.1 CPython/3.11.5
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 4d645ca8166af4494c0d4fa672302440b524b5afe050dfdce5f2bfbff8318abf |
|
MD5 | 1abf71db39b458b0ac1b485d3ff5a888 |
|
BLAKE2b-256 | 79ffc6f606f951db55ebf1e89ce08b7d63a3f2b26c220d1b2661c441c890dec5 |