Quick Start¶
Get your Python package up and running in 5 minutes.
Prerequisites¶
Install uv for fast package management:
Create Your Package¶
Answer the prompts about your project. You'll be asked for:
project_name: Human-readable name (e.g., "My Awesome Package")package_name: Python import name with underscores (auto-derived, e.g., "my_awesome_package")project_slug: Repository/URL name with hyphens (auto-derived, e.g., "my-awesome-package")version: Initial version number (default: "0.1.0")description: One-line project descriptionauthor_name: Your nameauthor_email: Your email addressgithub_username: GitHub username or organization (optional)license: Choose from MIT (default), Apache-2.0, BSD-3-Clause, GPL-3.0, or Proprietarymin_python_version: Minimum Python version (default: 3.11, choices: 3.11-3.14)max_python_version: Maximum Python version (default: 3.14, choices: 3.11-3.14)include_actions: Include GitHub Actions CI/CD workflows? (default: true)include_examples: Include interactive marimo notebooks inexamples/? (default: true)
See Template Variables in the Reference for detailed descriptions.
Initialize Your Project¶
cd my-package
# Install dependencies
uv sync --group dev
# Set up pre-commit hooks
uv run pre-commit install
Verify Setup¶
Push to GitHub¶
git init
git add .
git commit -m "feat: initial project setup"
# Create repo on GitHub, then:
git remote add origin https://github.com/yourusername/my-package.git
git branch -M main
git push -u origin main
Setup CI/CD¶
Codecov (Coverage Reporting)¶
- Sign up at codecov.io
- Add your repository
- Go to Settings → Copy the upload token
- In GitHub: Settings → Secrets and variables → Actions → New secret
- Add
CODECOV_TOKENwith your token
Note: This token is used by multiple workflows: tests.yml (on every push/PR) and nightly.yml (daily dependency testing).
PyPI Publishing (Automated Releases)¶
Required setup (for automated releases):
- PyPI Trusted Publishing (OIDC, no tokens needed):
- Create account at pypi.org
- Publish your first release manually, or create the project on PyPI
- Go to your project → Manage → Publishing
-
Add a new publisher with:
- Owner: Your GitHub username/org
- Repository: Your repository name
- Workflow:
publish-release.yml - Environment:
pypi
-
GitHub Personal Access Token (for changelog PR creation):
- Go to GitHub Settings → Developer settings → Personal access tokens → Fine-grained tokens
- Click "Generate new token"
- Configure:
- Token name:
CHANGELOG_AUTOMATION_TOKEN - Expiration: 90 days or longer
- Repository access: Only select repositories → Choose your repository
- Permissions: Contents (Read/Write), Pull requests (Read/Write)
- Token name:
- In repository Settings → Secrets and variables → Actions → New secret
-
Add
CHANGELOG_AUTOMATION_TOKENwith your token -
Configure PyPI environment protection (for manual approval):
- Go to repository Settings → Environments
- Click on
pypienvironment (or create it) - Enable "Required reviewers" and add yourself as a reviewer
- This ensures PyPI releases require manual approval after GitHub Release creation
Release your package by pushing a version tag:
This triggers: changelog generation → PR creation → (after merge) GitHub release → manual approval → PyPI publish.
See the Contributing Guide for detailed release process documentation.
ReadTheDocs (Documentation)¶
- Go to readthedocs.org
- Sign in with GitHub
- Click "Import a Project"
- Select your repository
- Click "Build version" - your docs are live!
Documentation builds automatically on every push to main.
Next Steps¶
- Set Up CI/CD Services - Configure Codecov, PyPI publishing, and ReadTheDocs
- Customize Your Project - Adjust ruff rules, coverage thresholds, and more
- Add Dependencies - Add runtime and development dependencies
- Reference: Commands - Full command reference for just, nox, and uv
- Contributing - Help improve the template
- GitHub Template - Source code and issues