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 releases
- (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.