Skip to content

slangenbach/cookiecutter-python-uv

Repository files navigation

cookiecutter-python-uv

Cookiecutter template for Python projects using uv featuring:

  • Flexible project structure using the src layout
  • Python version and Python dependency management with uv
  • Code linting and formatting with ruff
  • Testing with pytest
  • Automated quality assurance with pre-commit
  • CICD with GitHub Actions

Prerequisites

Installation

Install Cookiecutter via uv: uv tool install cookiecutter

Usage

Generate the project structure via uv tool run cookiecutter https://github.com/slangenbach/cookiecutter-python-uv

|- .devcontainer/                   <- devcontainer configuration
|- .github/                         <- GitHub Actions workflows
|- .vscode/                         <- VSCode configuration
|- data/                            <- Data for debugging and testing
|- notebooks/                       <- Jupyter notebooks
|- src/                             <- Source code
|- tests/                           <- Tests
|- .gitignore                       <- Files ignored by git
|- .pre-commit-config.yaml          <- pre-commit configuration
|- .python-version                  <- Python version used by package
|- pyproject.toml                   <- Package and tooling configuration
|- README.md                        <- Top-level README
|- uv.lock                          <- uv lock file

Contributing

  1. Run project setup: uv sync and uv run pre-commit install
  2. Create a dedicated development branch: git checkout -b YOUR-BRANCH-NAME
  3. Make changes
  4. Run linters: uv run pre-commit run all-files
  5. Run tests: uv run pytest
  6. Commit changes and create a pull request

About

Cookiecutter template for Python projects using uv

Resources

License

Stars

Watchers

Forks

Languages