Skip to content

Latest commit

 

History

History
62 lines (44 loc) · 1.1 KB

File metadata and controls

62 lines (44 loc) · 1.1 KB

Python Package Template

A small, typed Python package starter using uv, Ruff, ty, and prek.

Start a Project

  1. Use this repository as a template, or clone it.
  2. Rename src/python_template to your package name.
  3. Update the package name, metadata, and repository URL in pyproject.toml.
  4. Replace this README and the example tests.

Then run:

uv sync
uv run prek install
uv run prek run --all-files
uv run pytest

The failing test in tests/test_dummy.py is intentional. Replace it with a real test when you start the project.

Checks

Run formatting, linting, and type checking with:

uv run prek run --all-files

Run tests with:

uv run pytest

Add or remove a dependency with either command:

uv add <package>
uv remove <package>

Upgrade all locked dependencies with:

uv lock --upgrade
uv sync

Version

To bump the project version:

uv version --bump patch
uv version --bump minor
uv version --bump major