Skip to main content

A template for python packages

Project description

pypkgkit

CI PyPI License Docs

A Cookiecutter template for Python packages. One command gives you a fully configured project with linting, type checking, testing, CI/CD, documentation, and automated releases — all wired together and ready to go.

Quick start

From GitHub (latest)

# Install cookiecutter if you haven't already
uv tool install cookiecutter

# Generate a new project from the latest template
cookiecutter gh:michaelellis003/pypkgkit

From PyPI (pinned version)

# Install pypkgkit
uv tool install pypkgkit

# Generate a new project using a specific release
uvx cookiecutter pypkgkit

Installing from PyPI lets you pin to a specific template version. The package includes the cookiecutter template and can be used directly as a cookiecutter source.

You will be prompted for a few values:

Variable Default Description
project_name my-python-package Name of the project (used in PyPI, GitHub, etc.)
project_slug auto Python-importable name (derived from project name)
project_description A Python package One-line description
author_name Your Name Author name for pyproject.toml and LICENSE
author_email you@example.com Author email
github_username your-github-username GitHub username (used in URLs, badges, CODEOWNERS)
python_version 3.12 Minimum Python version
initial_version 0.1.0 Starting version

After generation, the template automatically:

  1. Initializes a git repository
  2. Installs dependencies with uv sync
  3. Installs pre-commit hooks
  4. Creates an initial commit

What is included

Every generated project comes with:

Concern Tool
Package management uv
Linting & formatting Ruff
Type checking ty
Testing pytest
Documentation ProperDocs (MkDocs Material + mkdocstrings)
Versioning & releases python-semantic-release with Conventional Commits
CI/CD GitHub Actions (lint, type check, test across 3.10 – 3.13, build, release to PyPI, deploy docs)
Dependency updates Dependabot (weekly, for both Actions and pip)
Pre-commit hooks Ruff, ty, license headers, conventional commit validation

After generating your project

  1. Create a GitHub repo and push:

    git remote add origin https://github.com/<username>/<project-name>.git
    git push -u origin main
    
  2. Configure GitHub settings:

    • GitHub Pages: Settings > Pages > Source: gh-pages
    • RELEASE_TOKEN: Settings > Secrets — a PAT with contents: write
    • PyPI trusted publishing: add the repo on pypi.org
    • CODECOV_TOKEN: Settings > Secrets (optional)

Requirements

Contributing

To work on the template itself:

git clone https://github.com/michaelellis003/pypkgkit.git
cd pypkgkit
uv sync
uv run pre-commit install
uv run pre-commit install --hook-type commit-msg
uv run pre-commit install --hook-type pre-push

Test the template locally:

cookiecutter . --no-input

License

Apache 2.0. See LICENSE for the full text.

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

pypkgkit-2.1.2.tar.gz (3.3 kB view details)

Uploaded Source

Built Distribution

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

pypkgkit-2.1.2-py3-none-any.whl (3.9 kB view details)

Uploaded Python 3

File details

Details for the file pypkgkit-2.1.2.tar.gz.

File metadata

  • Download URL: pypkgkit-2.1.2.tar.gz
  • Upload date:
  • Size: 3.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for pypkgkit-2.1.2.tar.gz
Algorithm Hash digest
SHA256 83c62dbf4d3cc926b579a2a6d887adb9d58db539b83d945d34b7f808924ccfb4
MD5 612d303c1e277b6456970bd9bd2f06b6
BLAKE2b-256 70d1b3a105a336d335ac02392ed506384c598af23c9c893f5103cb745ae46954

See more details on using hashes here.

Provenance

The following attestation bundles were made for pypkgkit-2.1.2.tar.gz:

Publisher: release.yml on michaelellis003/pypkgkit

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file pypkgkit-2.1.2-py3-none-any.whl.

File metadata

  • Download URL: pypkgkit-2.1.2-py3-none-any.whl
  • Upload date:
  • Size: 3.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for pypkgkit-2.1.2-py3-none-any.whl
Algorithm Hash digest
SHA256 e1dd0e64671bc4b9d043f452f739cd2c6761829158d0a207919b8025f0a64995
MD5 69d5da683087d016648a8dd1c750f5c8
BLAKE2b-256 f007a033684e06b4e02499ed6b019ebf0e117482a65511ef6f8c33a79a93bfa6

See more details on using hashes here.

Provenance

The following attestation bundles were made for pypkgkit-2.1.2-py3-none-any.whl:

Publisher: release.yml on michaelellis003/pypkgkit

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

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