Skip to main content

A template for python packages

Project description

pypkgkit

CI PyPI Python codecov License Docs

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-2.1.0.tar.gz (3.2 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.0-py3-none-any.whl (3.8 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: pypkgkit-2.1.0.tar.gz
  • Upload date:
  • Size: 3.2 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.0.tar.gz
Algorithm Hash digest
SHA256 ba812b29a44545bf1bfd9d6302a39d013527a31a30882807a09ca9915dbca7df
MD5 701de8142b198f136ffc6c8c57f357de
BLAKE2b-256 e49f2216bc1a69f18f34b7601310ae1212b8806f7b2be79f050d0d65fed865e8

See more details on using hashes here.

Provenance

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

File metadata

  • Download URL: pypkgkit-2.1.0-py3-none-any.whl
  • Upload date:
  • Size: 3.8 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.0-py3-none-any.whl
Algorithm Hash digest
SHA256 d95a9a21277654faaf150000cfb307175406070eafeca4b29f7a4daf024123a0
MD5 31a95f118963a3b8e2baf060997ddc96
BLAKE2b-256 c4b0a419d9b0570c7115c97629cfd3f830e5d001fe7317d6c3044cffb716981b

See more details on using hashes here.

Provenance

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