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.1.tar.gz (14.7 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.1-py3-none-any.whl (4.8 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: karlicoss_pymplate-0.2.1.tar.gz
  • Upload date:
  • Size: 14.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: uv/0.11.31 {"installer":{"name":"uv","version":"0.11.31","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.1.tar.gz
Algorithm Hash digest
SHA256 9ef53f05a9ca7202845f8049623455e1c9c284fadc7871f53090db920316b4cd
MD5 2bc4c02c3c41a16544b27099e1a990c6
BLAKE2b-256 afd84423d6f7106a0e0741433852aa5a1e5421d97f146327c0c09552334e507a

See more details on using hashes here.

File details

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

File metadata

  • Download URL: karlicoss_pymplate-0.2.1-py3-none-any.whl
  • Upload date:
  • Size: 4.8 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: uv/0.11.31 {"installer":{"name":"uv","version":"0.11.31","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.1-py3-none-any.whl
Algorithm Hash digest
SHA256 8c755dfe34c5b8e8b178813845c981ae8d9bb33b31e93b24cfe79ec65cb5c888
MD5 70eb4c117159df51154af11016eeab7f
BLAKE2b-256 57b999acf9daa87c44eecb0fe4ff37a5386d85c7b2274fe7817e49a723f010db

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