Note: If you're looking for the old CookieCutter template, see this branch
My second attempt at making a Python template.
I've seen many other projects like this but I've never seen any of them follow the pattern I want. I highly recommend you Fork This Project for your own needs because many of the defaults (e.g. README structure) are quite opinionated.
- π Package management
- π¨ Linters (checked via GitHub Actions
)
- β« Black
- π MyPy
- β‘ Ruff (which includes
isort
and Pylint and many, many others...) β οΈ Uses.pre-commit-config.yaml
- π Uses
.editorconfig
- π§ͺ Hypothesis, codecov, and Pytest for testing
Uses GitHub Actions for CI
- β Cached workflows
- π Tests for Python 3.8+ on π§ Linux, π Mac, and π Windows.
- π Automatically generate and upload distribution files on tagged GitHub releases
- π§ Publish to PyPi with Trusted Publishers
- (Optional) πΈ Documentation via Sphinx
- π¨οΈ Template usage features
- β»οΈ Pyt2 uses Copier, therefore Pyt2 has template syncing features
- π Pre-computed lockfile (
poetry.lock
) with up-to-date dependencies via CI ()
- π Has a
test_version.py
which will test if the__version__
metadata variable in the package is equal to the one in thepyproject.toml
- (Optional) π¬
__main__.py
and[tool.poetry.scripts]
entry point generation (for applications)
First, install Copier (preferably using pipx):
pipx install copier
Now you can run this command to create a new folder in the current directory that contains the scaffolded project:
copier copy gh:ThatXliner/pyt2 .
Or for the bleeding-edge version on the master
branch:
copier copy gh:ThatXliner/pyt2 . --vcs-ref master
If you have already made a project using this and this template gets a new release, you may update your project by running
copier update
in your project.
Pronunciation: pit-too Why this is the name: Python Template 2
But you can fork this and modify the default license in the template anyways. This template, however, is released to the Public Domain.