A generic python project template based on copier for my data science focused projects.
pip install copiercopier copy --trust --vcs-ref=HEAD git+https://github.com/twsl/python-project-template /path/to/destination- Supports
Python 3.10and higher. uvorPoetryas a dependencies manager. See configuration inpyproject.toml.- Automatic codestyle with
ruff. - Ready-to-use
pre-commithooks with code-formatting. Execute withprekorpre-commit - Type checks with
tyorpyright. - Security checks with
bandit. - Testing with
pytest. - Ready-to-use
.editorconfigand.gitignore. - Ready-to-use
Devcontainer. - Find dead code with
vulture. - Avoid credential leaks with
gitleaks.
GitHubintegration: Ready-to-use Pull Requests templates and several Issue templatesGithub Actionswith predefined workflows.- Everything is already set up for security checks, codestyle checks, code formatting, testing, linting, docker builds
- Always up-to-date dependencies with
@dependabot. - Automatic release notes with
Release Drafter. - Documentation with
MkDocs.
- Files such as:
LICENSE,CONTRIBUTING.md,CODE_OF_CONDUCT.md, andSECURITY.mdare generated automatically. - Semantic Versions specification with
Release Drafter.
To begin using the template consider updating copier:
pip install --upgrade copierThen, you can copy the template to your destination folder:
copier copy --trust git+https://github.com/twsl/python-project-template path/to/destination --vcs-ref=HEADYou can update the template in your destination folder with:
copier update --trust -A --vcs-ref=HEADThe devcontainer is already set up for you, just open the project in VSCode and you will be prompted to open the project in the devcontainer.
To test the project you can run:
copier copy ./ ./dist --data-file "./.github/assets/.copier-answers-uv.yml" -f --vcs-ref=HEADcopier copy ./ ./dist --data-file "./.github/assets/.copier-answers-poetry.yml" -f --vcs-ref=HEADThe template uses the following variables to customize the project:
| Parameter | Default value |
|---|---|
custom_install |
customized |
project_name |
example_project |
project_description |
`` |
repository_provider |
github.com |
ghec |
false |
ghes |
false |
primary_branch |
main |
author_username |
`` |
author_email |
{{ author_username }}@users.noreply.github.com |
repository_provider |
github.com |
repository_namespace |
{{ author_username }} |
repository_name |
{{ project_name }} |
copyright_holder |
{{ author_username }} |
copyright_holder_email |
{{ author_email }} |
copyright_year |
2026 |
copyright_license |
MIT |
python_version |
3.12 |
python_package_distribution_name |
{{ project_name }} |
python_package_import_name |
{{ project_name }} |
python_package_command_line_name |
{{ project_name }} |
line_ending |
lf |
package_manager |
uv |
type_checker |
ty |
use_precommit |
true |
precommit_tool |
prek |
include_docs |
true |
include_notebooks |
true |
include_databricks |
false |
github_runner_python_version |
[3.12] |
github_runner |
ubuntu-latest |
github_runner_ghec |
ubuntu-2core-amd64 |
github_runner_clean |
true |
github_rate_limit |
false |
include_sample_code |
false |
self_signed |
false |
copier_auto_update |
false |
All input values will be saved in the .copier-answers.yml