A professional Python project template powered by uv, pytest, ruff, black, and GitHub Actions.
A batteries-included starter for modern Python projects using the src/ layout, sensible toolchain, and CI.
- src-based package layout:
src/python_quick_starter - Testing with pytest
- Linting and import sorting with Ruff, formatting with Black
- Type checking with mypy
- uv for dependency and Python management
- GitHub Actions for CI (tests, lint, type-check, build)
First, install uv (one-time):
# Windows PowerShell
irm https://astral.sh/uv/install.ps1 | iexClone the repo and install dependencies (including dev tools):
uv sync --all-groupsThis creates a virtual environment (usually at .venv) and installs dependencies.
Run the CLI:
uv run python-quick-starter --name AliceOr as a module:
uv run python -m python_quick_starter --name BobBasic Python import:
from python_quick_starter.cli import main
main(["--name", "Charlie"]) # returns 0- Format:
uv run black . - Lint:
uv run ruff check . - Type-check:
uv run mypy . - Tests:
uv run pytest -q - Build:
uv build
Common one-liner to check everything:
uv run ruff check . ; uv run black --check . ; uv run mypy . ; uv run pytest -q ; uv buildThis template includes a MkDocs site using the Material theme.
- Build docs:
uv run mkdocs build --strict - Serve docs locally:
uv run mkdocs serve -a localhost:8000
The configuration lives in mkdocs.yml; content is in the docs/ folder. API reference is generated from the package using mkdocstrings.
Cross-platform task runner scripts are provided in scripts/:
- Python task runner:
uv run python scripts/tasks.py [task] - Bash wrapper (Linux/macOS):
scripts/task.sh [task] - PowerShell wrapper (Windows):
scripts/task.ps1 [task]
Available tasks: setup, lint, format, typecheck, test, build, docs:build, docs:serve, ci (all checks).
.
├─ src/
│ └─ python_quick_starter/
│ ├─ __init__.py
│ ├─ __main__.py
│ └─ cli.py
├─ tests/
│ └─ test_cli.py
├─ docs/
│ └─ index.md
├─ .github/workflows/ci.yml
├─ pyproject.toml
├─ README.md
├─ LICENSE
└─ CHANGELOG.md
This template uses pytest. Configuration lives in pyproject.toml under tool.pytest.ini_options.
uv run pytest -qSee CONTRIBUTING.md for guidelines. Issues and PRs are welcome.
A release workflow template is included at .github/workflows/release.yml and is commented out by default. To enable publishing to PyPI:
- Create a PyPI token and save it as
PYPI_API_TOKENin GitHub repo secrets - Uncomment the publish step in
release.yml - Push a tag like
v0.1.0
MIT — see LICENSE.