Skip to main content

A template for python packages

Project description

pypkgkit

A minimal, opinionated template for Python packages.

The goal is straightforward: provide a single starting point that assembles modern Python tooling into a coherent whole, so that new projects begin with CI, documentation, and release automation already in place — rather than reinventing this infrastructure each time.

What is included

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

Requirements

  • Python 3.10 or later
  • uv installed

Getting started

Clone the repository and install dependencies:

git clone https://github.com/michaelellis003/pypkgkit.git
cd pypkgkit
uv sync

Install the pre-commit hooks:

uv run pre-commit install
uv run pre-commit install --hook-type commit-msg
uv run pre-commit install --hook-type pre-push

Development

A Makefile is provided for common tasks:

make test        # lint + pytest
make lint        # ruff check, format check, license headers, ty
make format      # add license headers, ruff format, ruff fix
make license     # add missing license headers
make docs        # build documentation
make serve-docs  # serve documentation locally
make install     # uv sync
make clean       # git clean (preserves .venv)

Or invoke tools directly:

uv run pytest -v
uv run ruff check .
uv run ruff format .
uv run ty check
uv run properdocs serve

How releases work

Releases are fully automated. When a commit lands on main and CI passes, python-semantic-release inspects the commit history to determine whether a version bump is warranted:

  • fix: ... produces a patch release (0.1.0 → 0.1.1)
  • feat: ... produces a minor release (0.1.0 → 0.2.0)
  • A BREAKING CHANGE footer or ! suffix produces a major release (0.1.0 → 1.0.0)

If a bump is triggered, the pipeline updates the version in pyproject.toml and src/pypkgkit/__init__.py, creates a Git tag and GitHub release, generates the changelog, builds the package, and publishes it to PyPI via trusted publishing. Documentation is deployed to GitHub Pages immediately after.

Commit messages that do not follow the Conventional Commits spec are rejected by a pre-commit hook, so the release process stays well-defined.

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-0.1.0.tar.gz (3.0 kB view details)

Uploaded Source

Built Distribution

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

pypkgkit-0.1.0-py3-none-any.whl (3.6 kB view details)

Uploaded Python 3

File details

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

File metadata

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

File hashes

Hashes for pypkgkit-0.1.0.tar.gz
Algorithm Hash digest
SHA256 c239822f7d89fb4e08ceedcf0979856f927926e848dfb52f2068a295fad21641
MD5 cc55e763b2fe5b379910dba9bd0ebac4
BLAKE2b-256 691e44c8defb651f704d39da3a50b63034dff2a8f28719cad399bd3466b51233

See more details on using hashes here.

Provenance

The following attestation bundles were made for pypkgkit-0.1.0.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-0.1.0-py3-none-any.whl.

File metadata

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

File hashes

Hashes for pypkgkit-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 9195ad985d28b24a02e2e5599e2e385586c1aad812b827a2bc8345baa26b9567
MD5 60f94594a48b159930f401f98b16a8e1
BLAKE2b-256 153dc8804ef8bb16eb9712f96d0b1ef24ef3b5cd4c362540785f458a825fabb9

See more details on using hashes here.

Provenance

The following attestation bundles were made for pypkgkit-0.1.0-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