Skip to content

About

An opinionated Copier template for Python projects

Resources

Stars

2 stars

Watchers

1 watching

Forks

Latest commit

 

History

91 Commits

Folders and files

Repository files navigation

Python project template

An opinionated Copier template for Python projects managed by uv.

Generated projects require Python 3.11 or newer (3.15 by default).

Features

Quickstart

First, install uv and Copier.

Then, to create a new project based on this template, run the following command and fill in the form:

copier copy 'https://github.com/vivienm/copier-python' path/to/your/project

Go to the project directory and initialize a Git repository:

cd path/to/your/project
git init

If you enabled nix_flake, use Nix with flakes enabled. Track the generated files and enter the development shell, which provides Python, uv and the development tools (including Rust tools for maturin):

git add .
nix develop

Otherwise, if you chose maturin, install Rust using rustup, then install the required components and development tools:

rustup component add rustfmt clippy
cargo install --locked cargo-audit

Upgrade the dependencies and update their minimum versions in pyproject.toml:

uv lock
uvx uv-bump
uv sync

If you chose the uv build backend, also update the uv_build requirement in pyproject.toml for your uv version (uv --version), following the upstream recommendation.

Format the generated Python files, then run the checks:

uv run ruff format
uv run just ci

For applications with nix_flake enabled, nix flake check builds the application and, if you selected pytest, runs its tests using the dependencies from uv.lock.

If you enabled github_pages, configure your GitHub repository before the first push to its default branch: in Settings → Pages → Build and deployment, set Source to GitHub Actions. The generated workflow will then publish the project documentation.

You are now ready to start coding!

Later, to update your project as this template evolves, run:

copier update --skip-answered

About

An opinionated Copier template for Python projects

Resources

Stars

2 stars

Watchers

1 watching

Forks

Releases

Packages

Contributors

Languages