Skip to content

Repository files navigation

Python Project Template

CopierDocs with MkDocslinting: ruffsecurity: banditSemantic VersionsLicenseSPEC 0 — Minimum Supported Dependencies

A generic python project template based on copier for my data science focused projects.

  • Package Manager: uv or Poetry
  • pre-commit: prek or pre-commit
  • Type checker: ty or Checked with pyright

TL;DR

pip install copier
copier copy --trust --vcs-ref=HEAD git+https://github.com/twsl/python-project-template /path/to/destination

Features

Development features

Deployment features

  • GitHub integration: Ready-to-use Pull Requests templates and several Issue templates
  • Github Actions with 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.

Open source community features

How to use it

Installation

To begin using the template consider updating copier:

pip install --upgrade copier

Then, 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=HEAD

Update

You can update the template in your destination folder with:

copier update --trust -A --vcs-ref=HEAD

Development

The 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=HEAD
copier copy ./ ./dist --data-file "./.github/assets/.copier-answers-poetry.yml" -f --vcs-ref=HEAD

Variables

The template uses the following variables to customize the project:

ParameterDefault value
custom_installcustomized
project_nameexample_project
project_description``
repository_providergithub.com
ghecfalse
ghesfalse
primary_branchmain
author_username``
author_email{{ author_username }}@users.noreply.github.com
repository_providergithub.com
repository_namespace{{ author_username }}
repository_name{{ project_name }}
copyright_holder{{ author_username }}
copyright_holder_email{{ author_email }}
copyright_year2026
copyright_licenseMIT
python_version3.12
python_package_distribution_name{{ project_name }}
python_package_import_name{{ project_name }}
python_package_command_line_name{{ project_name }}
line_endinglf
package_manageruv
type_checkerty
use_precommittrue
precommit_toolprek
include_docstrue
include_notebookstrue
include_databricksfalse
github_runner_python_version[3.12]
github_runnerubuntu-latest
github_runner_ghecubuntu-2core-amd64
github_runner_cleantrue
github_rate_limitfalse
include_sample_codefalse
self_signedfalse
copier_auto_updatefalse

All input values will be saved in the .copier-answers.yml

About

A generic python project template based on copier for my data science focused projects.

Topics

Resources

Stars

1 star

Watchers

1 watching

Forks

Releases

Used by

Contributors

Languages