Skip to main content

Bootstrap a new Python project with best-practice tooling.

Project description

pyptmpl

Bootstrap a new Python project with best-practice tooling, runnable with a single command:

uvx pyptmpl my-project

It scaffolds a fully-configured Python project.

Features

  • Runs uv init --lib to create the project skeleton
  • Writes an opinionated pyproject.toml (CalVer, beartype, ruff, basedpyright, pyrefly, coverage)
  • Creates a smoke test under src/<package>/tests/
  • Creates a virtual environment via uv venv
  • Creates .gitignore, .yamllint, and .vscode/settings.json
  • Creates a single root justfile with quality, test, docs, and build recipes
  • Creates docs/build scaffolding (docs/, docs_sphinx/, zensical.toml, build.spec)
  • Creates .secrets.baseline alongside pre-commit config for detect-secrets
  • Optionally downloads a license from scancode-licensedb
  • Optionally installs prek and writes .pre-commit-config.yaml (ssort, ruff, basedpyright, pyrefly, vulture, deptry, pip-audit, coverage-100, …)
  • Optionally generates GitHub Actions workflows (lint-format, tests, typecheck, quality-security, publish-pypi, docs, sphinx-api, github-release) and dependabot.yml
  • Runs uv sync --extra dev --extra docs --extra build by default to generate uv.lock

Prerequisites

  • uv on PATH
  • git on PATH (optional – used to pre-fill author name/email)

Usage

uvx pyptmpl [OPTIONS] [PROJECT_NAME]

positional arguments:
  project_name          Name of the new project (prompted if omitted)

options:
  -h, --help            show this help message and exit
  -v, --version         show program version and exit
  -p VERSION, --python-version VERSION
                        Python version to target, e.g. 3.13 (prompted if omitted)
  -d TEXT, --description TEXT
                        Short project description (prompted if omitted)
  --no-license          Skip the interactive license selection step
  --no-prek             Skip prek / pre-commit setup
  --no-github-actions   Skip GitHub Actions workflow generation
  --no-sync             Skip final uv sync/lockfile generation

Examples

# Fully interactive
uvx pyptmpl

# Supply all required values up front
uvx pyptmpl my-lib --python-version 3.13 --description "A cool library"

# Skip optional steps
uvx pyptmpl my-lib -p 3.13 -d "A cool library" --no-license --no-prek --no-github-actions

Project structure

pyptmpl keeps all its boilerplate in src/pyptmpl/templates/:

src/pyptmpl/templates/
├── pyproject.toml.tmpl                          # pyproject.toml skeleton
├── test_smoke.py.tmpl                           # smoke test
├── gitignore.tmpl                               # .gitignore entries
├── yamllint.tmpl                                # .yamllint config
├── vscode_settings.json.tmpl                    # .vscode/settings.json
├── justfile.tmpl                                # root justfile
├── pre-commit-config.yaml.tmpl                  # .pre-commit-config.yaml
├── typos.toml.tmpl                              # typos dictionary overrides
├── docs/index.md.tmpl                           # docs site landing page
├── docs/python-api.md.tmpl                      # API docs page
├── docs_sphinx/conf.py.tmpl                     # Sphinx configuration
├── docs_sphinx/custom.css.tmpl                  # Sphinx API styling
├── zensical.toml.tmpl                           # Zensical site config
├── build.spec.tmpl                              # PyInstaller spec template
├── github/dependabot.yml.tmpl
├── github/workflows/github-release.yml.tmpl
├── github/workflows/docs.yml.tmpl
├── github/workflows/lint-format.yml.tmpl
├── github/workflows/publish-pypi.yml.tmpl
├── github/workflows/quality-security.yml.tmpl
├── github/workflows/sphinx-api.yml.tmpl
├── github/workflows/tests.yml.tmpl
└── github/workflows/typecheck.yml.tmpl

Template variables use {{VARNAME}} syntax. Add or modify templates to customize generated output for every new project.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

pyptmpl-2026.4.16.0.tar.gz (27.3 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

pyptmpl-2026.4.16.0-py3-none-any.whl (42.7 kB view details)

Uploaded Python 3

File details

Details for the file pyptmpl-2026.4.16.0.tar.gz.

File metadata

  • Download URL: pyptmpl-2026.4.16.0.tar.gz
  • Upload date:
  • Size: 27.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: uv/0.11.7 {"installer":{"name":"uv","version":"0.11.7","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

File hashes

Hashes for pyptmpl-2026.4.16.0.tar.gz
Algorithm Hash digest
SHA256 40006f800aa7576cc2371460d41d2dfa1259487f87bfe2746fbb1676bae2f6a2
MD5 80a90af5897ed0ac32044924765dfae4
BLAKE2b-256 498e1af9b56f18db68fa11aa985376d59bbce1a4a5b64cce0da53fe541a63ea7

See more details on using hashes here.

File details

Details for the file pyptmpl-2026.4.16.0-py3-none-any.whl.

File metadata

  • Download URL: pyptmpl-2026.4.16.0-py3-none-any.whl
  • Upload date:
  • Size: 42.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: uv/0.11.7 {"installer":{"name":"uv","version":"0.11.7","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

File hashes

Hashes for pyptmpl-2026.4.16.0-py3-none-any.whl
Algorithm Hash digest
SHA256 50121f6490942c2bcc87692294914495b25750d6d5c291c6f01c90816178f196
MD5 2d0b1099b8ef2250b83f4178e5d04cdb
BLAKE2b-256 a290df2ce6b0d7b2b40cbad4b89ed69bd888ad1689e47fa268cbf5efb5e59e3c

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page