Follow this checklist to set up your own Python project with the Python Project Blueprint.
Legend
- USER: Manual action performed by the developer.
- BOOTSTRAP: Automatically handled by the bootstrap workflow.
- USER: Click
Use this templateandCreate a new repository. - USER: Update
Repository name,Description, and choose visibility. - USER: From
main, create a new branch namedbootstrapfor one-time initialization.
Note: The bootstrapping process uses the repository metadata, such as GitHub username, repository name, and description, to configure and rebrand your project. The
bootstrapbranch is used only for initializing and configuring the project, it will be deleted after bootstrapping. See Bootstrapping Workflow for details.
- USER: Create a Snyk account if not already present.
- USER: Add
SNYK_TOKENas a new repository secret under Settings → Secrets and variables → Actions & Dependabot. (found under https://app.snyk.io/account → Auth Token) - USER: Add
SNYK_ORG_IDas a new repository secret under Settings → Secrets and variables → Actions & Dependabot. (found under https://app.snyk.io/org/ your-org /manage/settings → Organization ID)
Note: If you don't want to use Snyk for security scanning, delete or replace the
snyk-security-scanjob in.github/workflows/security.yml.
- USER: Create a Codecov account if not already present.
- USER: Add
CODECOV_TOKENas a new repository secret under Settings → Secrets and variables → Actions & Dependabot. (found under https://app.codecov.io/gh/ your-org / your-repo /new → Step 3: add token) - USER: Install the Codecov App on your GitHub organization and give repository access with
Only select repositories.
Note: If you don't want to use Codecov for PR comments and testing visualization, delete the
codecov.ymlfile and theUpload coverage reports to Codecovstep in.github/workflows/ci.ymland.github/workflows/pr-checks.yml.
- USER: Create a TestPyPI account if not already present.
- USER: Add a new project under pending publisher
- USER: Add
testpypias a new environment to the GitHub repository under Settings → Environments. - USER: Update the TestPyPI environment URL at
.github/workflows/cd.ymlwith your project URL.
Note: Deployments in
cd.ymlare commented out by default. Uncomment them once you are ready to deploy. As a result, TestPyPI setup can also be completed later. Delete or replace thepublish_test_pypijob if not needed.
- USER: Open
.github/bootstrap-config.ymland update details. - USER: Commit directly to the
bootstrapbranch. - USER: In the repository, go to Actions → Bootstrap Template, select Run workflow→ Use workflow from branch → choose
bootstrapbranch, and run the workflow. - USER: Once the workflow has completed, open a pull request (base:
main<- compare:bootstrap), prefix the title withci: bootstrap, and create the pull request. - USER: Once all checks have passed, merge the pull request and confirm the merge. You can now delete the
bootstrapbranch. - USER: Verify that the CI workflow runs successfully on
mainafter merging the PR.
After cloning the new repository to your local development machine and creating a virtual environment (using your preferred tool), install your project using the package manager of your choice:
- USER: Install dependencies using pip, uv, or poetry:
pip install -e . --group dev.uv sync.poetry install.
- USER: Run
prek install. - USER: Run the application
python -m <package_name>.main.
Note: Git must be installed, and you must be inside the cloned Git repository.
The project is now fully initialized and ready for development. You can start implementing features and adding tests.
Note: By default, the project runs in development mode (
APP_ENV=dev).
To switch the branching strategy, uncomment the relevant lines in:
- USER:
.github/workflows/pr-checks.yml. - USER:
.github/workflows/ci.yml. - USER:
.github/workflows/security.yml.
Otherwise, delete the commented-out lines.
- USER: Rename
.config/.env.exampleto.config/.env.devand update required secrets. - USER: Update required application settings in
.config/config.dev.toml. - USER: Update values to match your
.env.devand.config/config.dev.tomlsettings insrc/<your_package_name>/utils/config.py.
- USER: Delete
.gitkeepindata/,notebooks/andres/if applicable, empty directories will disappear from GitHub. - USER: Update text in
docs/DOCUMENTATION.mdif applicable. - USER: Update License type if applicable.
- USER: Update dependencies & [dependency-groups] in
pyproject.tomlif applicable. - USER: Update text in
README.md.
The provided bootstrapping workflow (found in .github/workflows/bootstrap.yml) automatically configures, rebrands
and initializes your project based on the provided metadata and updated details in .github/bootstrap-config.yml.
Finally, the bootstrapping specific documents are deleted, leaving you with a clean repository.
The workflow automatically updates the following sections:
- BOOTSTRAP: Update [[REPO_NAME]] in
.config/config.dev.toml.
- BOOTSTRAP: Update [[USERNAME]] in
.github/CODEOWNERSfile to reflect ownership of repository creator. - BOOTSTRAP: Update [[USERNAME]] in
.github/dependabot.ymlto reflect reviewers & assignees.
Note: If ownership, reviewers or assignees are different to the repository creator, this needs to be manually updated.
- BOOTSTRAP: Update [[PACKAGE_NAME]] in
docker/docker-compose.yml&docker/Dockerfile. - BOOTSTRAP: Update
DISTRIBUTION-NAMEindocker/Dockerfileto reflect correct command. - BOOTSTRAP: Update
blueprint-dockerindocker/docker-compose.ymlto reflect correct image & container_name.
- BOOTSTRAP: Update [[EMAIL]] in
docs/CODE_OF_CONDUCT.mdto reflect correct contact. - BOOTSTRAP: Update [[REPO_NAME]] in
docs/CONTRIBUTING.mdto reflect correct repository name. - BOOTSTRAP: Update [[USERNAME]] in
docs/CONTRIBUTING.mdto reflect correct username. - BOOTSTRAP: Update [[EMAIL]] in
docs/CONTRIBUTING.mdto reflect correct contact. - BOOTSTRAP: Update [[REPO_NAME]] in
docs/SECURITY.mdto reflect correct repository name. - BOOTSTRAP: Update [[EMAIL]] in
docs/SECURITY.mdto reflect correct contact.
- BOOTSTRAP: Update
src/package_namedirectory. - BOOTSTRAP: Update
package_nameinsrc/package_name/__init__.py. - BOOTSTRAP: Update
package_nameimports insrc/package_name/main.py.
- BOOTSTRAP: Update
package_nameintests/test_config.py. - BOOTSTRAP: Update
package_nameintests/test_logger.py. - BOOTSTRAP: Update
package_nameintests/test_main.py.
- BOOTSTRAP: Update [[YEAR]] in
LICENSE.md. - BOOTSTRAP: Update [[USERNAME]] in
LICENSE.md.
- BOOTSTRAP: Update [project] metadata.
- BOOTSTRAP: Update [project.urls].
- BOOTSTRAP: Update [project.scripts].
- BOOTSTRAP: Update known-first-party in [tool.ruff.lint.isort] for import sorting.
- BOOTSTRAP: Update files in [tool.mypy].
- BOOTSTRAP: Update [[REPO_NAME]] in
README.md.
- BOOTSTRAP: Delete
.github/workflows/bootstrap.yml. - BOOTSTRAP: Delete
.github/bootstrap-config.yml. - BOOTSTRAP: Delete
docs/CHECKLIST.md. - BOOTSTRAP: Delete
docs/INSTRUCTIONS.md. - BOOTSTRAP: Replace
README.mdwithdocs/PROJECT_README.md.