A simple Python project template using uv and ruff, designed for modern Python development.
- Dependency Management: Powered by
uv. - Linting & Formatting: Fast and consistent code style with
ruff. - Testing: Pre-configured
pytestsetup. - Code Quality: Robust pre-commit hooks configured for formatting, linting, and type checking.
- Python Version: Targets Python 3.13 by default (configurable).
You need to have cookiecutter installed (preferably via uv):
uv tool install cookiecutterGenerate a new project:
cookiecutter https://github.com/yourusername/simple-python-template
# or if you have cloned this repo locally:
cookiecutter .Follow the prompts to configure your project.
-
Navigate to your new project directory
cd my_awesome_project -
Initialize a git repository
Crucial: Do this before installing hooks.git init -
Install dependencies
uv sync -
Set up pre-commit hooks (automatically generates
requirements.txt, lints, and runs tests)uv run pre-commit install -
Initial commit:
git add . git commit -m "Initial commit"
-
Run tests manually (optional, since pre-commit does it too)
uv run pytest