Cassidy's opinionated Python template. Enter at your own peril.
Requires uv
Setup: uv sync --dev
Lint: uv run ruff check
Format: uv run ruff format
Type-check: uv run ty check
Test: uv run pytest
Security audit: uv audit --preview-features audit
-
Create a new repository from this template on GitHub (click "Use this template")
-
Clone your new repository and navigate to it
-
Update project metadata in
pyproject.toml:- Change
nameto your project name (use kebab-case, e.g.,my-awesome-tool) - Update the
[project.scripts]entry point name to match (e.g.,my-awesome-tool = "my_awesome_tool.cli:main") - Update
authorswith your information - Modify
requires-pythonif needed - Update dependencies as required
- Change
-
Rename the package directory:
- Rename
src/python_template/tosrc/your_package_name/(use snake_case, e.g.,my_awesome_tool) - Update imports in
pyproject.toml(the[project.scripts]entry andversion-filepath) - Update imports in test files (
from python_template→from your_package_name) - Update imports in
src/your_package_name/__init__.py
- Rename
-
Update
.vscode/launch.json(if using VS Code):- Change
"module": "python_template"to"module": "your_package_name"in all configurations
- Change
-
Update the README:
- Replace the title and description
- Remove or customize this Template Setup section
-
Initialize your environment:
uv sync --dev
-
Verify everything works:
uv run pytest uv run ruff check uv run ty check