Skip to main content

pymplate

My opinionated Python project template.

The template is meant to be small, current, and practical. It uses modern Python packaging via pyproject.toml, keeps tests close to source modules, and relies on the same local toolchain as CI.

What It Includes

  • src/ layout with an implicit namespace package.
  • Packaging via hatchling and hatch-vcs.
  • Dependency management and isolated tool runs via uv, tox, and tox-uv.
  • Test discovery through pytest --pyargs, including doctests and source files that do not follow the usual test_*.py naming convention.
  • Linting and formatting with ruff.
  • Type checking with mypy and ty.
  • GitHub Actions CI across Linux, macOS, Windows, and supported Python versions.
  • PyPI/TestPyPI publishing through uv publish and GitHub Trusted Publishing.

Local Checks

Run the narrowest tox environment that validates your change:

tox -e ruff
tox -e format
tox -e tests
tox -e mypy
tox -e ty

For ruff preview checks:

tox -e ruff -- --preview

The CI entrypoint is .ci/run. It currently runs tox through uv tool run --with tox-uv, and CI uses it directly:

bash .ci/run

Prefer direct tox -e ... commands for ordinary local development, and check .ci/run when changing CI or tox behavior.

Test Layout

pyproject.toml intentionally configures pytest to collect all *.py files and doctests. This supports keeping tests next to implementation modules instead of adding separate files under tests/.

tests/test_pytest.py is a self-check for pytest namespace-package discovery. It runs without pytest as the outer test runner first, then invokes pytest in a temporary package tree to verify collection behavior.

Releases

The release script is .ci/release.

Manual publishing requires:

UV_PUBLISH_TOKEN=... .ci/release

For TestPyPI:

UV_PUBLISH_TOKEN=... .ci/release --use-test-pypi

In GitHub Actions, publishing uses Trusted Publishing instead of an API token:

  • commits to the repository default branch publish to TestPyPI;
  • v* release tags publish to PyPI.

The workflow lives in .github/workflows/main.yml.

Download files

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

Source Distribution

karlicoss_pymplate-0.2.0.tar.gz (14.6 kB view details)

Uploaded Source

Built Distribution

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

karlicoss_pymplate-0.2.0-py3-none-any.whl (4.8 kB view details)

Uploaded Python 3

File details

Details for the file karlicoss_pymplate-0.2.0.tar.gz.

File metadata

  • Download URL: karlicoss_pymplate-0.2.0.tar.gz
  • Upload date:
  • Size: 14.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: uv/0.11.28 {"installer":{"name":"uv","version":"0.11.28","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 karlicoss_pymplate-0.2.0.tar.gz
Algorithm Hash digest
SHA256 3a776ad9b01d9a2cd475cb3e9d178e49b2ed76000d8f0905eeaa0545aaa4b6dc
MD5 a0126b299d51cfa385b54667c17d4ff2
BLAKE2b-256 795f5af26a0f27ba65e5255ece4901b85d0d4cf874f45d82e803ccc58858c36d

See more details on using hashes here.

File details

Details for the file karlicoss_pymplate-0.2.0-py3-none-any.whl.

File metadata

  • Download URL: karlicoss_pymplate-0.2.0-py3-none-any.whl
  • Upload date:
  • Size: 4.8 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: uv/0.11.28 {"installer":{"name":"uv","version":"0.11.28","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 karlicoss_pymplate-0.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 75e055ae1517132136ec8a6c748be8100f3a65ae569e2f23b975ead794886525
MD5 399f85ed20b936152aee3cd85c010cfa
BLAKE2b-256 616cef650614d76f59edee498a276cd2a81f524013d4c227563f9f885176f530

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 Sentry Error logging StatusPage Status page