A small, typed Python package starter using uv, Ruff, ty, and prek.
- Use this repository as a template, or clone it.
- Rename
src/python_templateto your package name. - Update the package name, metadata, and repository URL in
pyproject.toml. - Replace this README and the example tests.
Then run:
uv sync
uv run prek install
uv run prek run --all-files
uv run pytestThe failing test in tests/test_dummy.py is intentional. Replace it with a
real test when you start the project.
Run formatting, linting, and type checking with:
uv run prek run --all-filesRun tests with:
uv run pytestAdd or remove a dependency with either command:
uv add <package>
uv remove <package>Upgrade all locked dependencies with:
uv lock --upgrade
uv syncTo bump the project version:
uv version --bump patch
uv version --bump minor
uv version --bump major