Skip to main content

A library that wraps many useful tools (linters, analysers, etc) to keep Python code clean, secure, well-documented and optimised.

Project description

tomte

A library that wraps many useful tools (linters, analysers, etc) to keep Python code clean, secure, well-documented and optimised.

Essentially does nothing else but pinning multiple packages to compatible versions, for consistency across many projects and simplicity of use.

Extremely (!) opinionated by design!

Wrapped tools

  • black
  • bandit
  • isort
  • flake8
  • mypy
  • safety
  • darglint
  • vulture
  • pylint
  • docs (various mkdocs libraries)
  • tests (various pytest libraries)
  • tox
  • liccheck

To install, for instance black, simply specify tomte[black]==VERSION, where VERSION is the latest version, and then use black CLI as required.

Development:

Install deps:

Install poetry. Install development dependencies before running maintenance scripts:

poetry install --with dev

Upgrading versions

Use the script directly (fully automated, no manual pin editing):

  1. Run poetry run python bump_to_latest.py

This command automatically:

  • Resolves latest compatible versions for <4,>=3.10 support.
  • Applies strict == pins with Poetry.
  • Falls back to the highest resolver-compatible version when the absolute latest conflicts.
  • Bumps package version (patch by default) in pyproject.toml, tomte/__init__.py, and tests/test_tomte.py.
  • Regenerates poetry.lock.

Useful flags:

  • --dry-run
  • --bump-version none|patch|minor|major
  • --no-lock

Name

"The Swedish hustomte (house elf/gnome) is a quiet little guy, dressed mostly in gray and red, living at your house or farmsted helping out by taking care of things around the house and keep everyone safe."

A tomte and his son enjoying quiet company of the cat. Illustration by Rolf Lidberg.

"A tomte and his son enjoying quiet company of the cat. Illustration by Rolf Lidberg."

Release guide:

Finish edits and ensure dev dependencies are installed (poetry install --with dev), then run poetry run python bump_to_latest.py, then poetry run pytest -q, then poetry build, then rm -rf dist, then poetry publish --build --username=<username> --password=<password>.

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

tomte-0.6.2.tar.gz (11.6 kB view details)

Uploaded Source

Built Distribution

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

tomte-0.6.2-py3-none-any.whl (14.2 kB view details)

Uploaded Python 3

File details

Details for the file tomte-0.6.2.tar.gz.

File metadata

  • Download URL: tomte-0.6.2.tar.gz
  • Upload date:
  • Size: 11.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for tomte-0.6.2.tar.gz
Algorithm Hash digest
SHA256 1cdfcdbc0cbc222ad95bfd35b9d3372316b3a53e5545c193d7b7410478905c6f
MD5 9d34807db2129aa441cc86bd49846cb5
BLAKE2b-256 02a74961a23d030db599b5dc9ea41de17aabf81441e6687052dec3f5f270f237

See more details on using hashes here.

File details

Details for the file tomte-0.6.2-py3-none-any.whl.

File metadata

  • Download URL: tomte-0.6.2-py3-none-any.whl
  • Upload date:
  • Size: 14.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for tomte-0.6.2-py3-none-any.whl
Algorithm Hash digest
SHA256 d57b466d2d65e2b1730651e041f64ac31bc86bb763a31c710dac805cedba1f1b
MD5 8535a78602bb29042cbaa8db6c313d71
BLAKE2b-256 e13df1c2223c182be15f52ddce03939bf54c739a47877b8e610499292f357e22

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