Skip to main content

thx

Rapid development assistant, and fast command runner for Python projects.

PyPI Release Documentation Status Changelog MIT Licensed

thx (“thanks”) is capable of running arbitrary jobs, configured via simple options in the PEP 518 standardized pyproject.toml. Jobs can be run on multiple Python versions at once, and independent steps can be executed in parallel for faster results.

Watch thx format the codebase, build sphinx docs, run the test and linter suites on five Python versions, and generate a final coverage report:

Demo of thx

thx can also watch for modifications to your project, and automatically run jobs every time changes are detected—it will even reload its configuration when your pyproject.toml changes:

Demo of thx in watch mode

Usage

Configuration uses standard TOML elements, and jobs can reference shared values, which will be interpolated at runtime:

[tool.thx.values]
module = "thx"

[tool.thx.jobs]
lint = [
    "flake8 {module}",
    "ufmt check {module}",
]
test = "python -m unittest -v {module}.tests"

The configuration above defines two jobs, “lint” and “test”; the “lint” job defines two steps, and these can optionally be run in parallel. Both jobs present themselves as separate commands in thx. Note the automatic replacement of {module} with the configured value thx when running jobs:

$ thx lint
> flake8 thx
> ufmt check thx
$ thx test
> python -m unittest thx.tests

They can also be run together in order, similar to makefiles:

$ thx test lint
> python -m unittest thx.tests
> flake8 thx
> ufmt check thx

By default, thx uses the active Python runtime for jobs, but can also run jobs on multiple runtimes in parallel:

[tool.thx]
python_versions = ["3.7", "3.8", "3.9"]
$ thx test
3.9> python -m unittest thx.tests
3.8> python -m unittest thx.tests
3.7> python -m unittest thx.tests

See the user guide for details on all available configuration options.

Install

thx is available on PyPI:

$ pip install thx

See the user guide for help getting started.

License

thx is copyright Amethyst Reese, and licensed under the MIT license. I am providing code in this repository to you under an open source license. This is my personal repository; the license you receive to my code is from me and not from my employer. See the LICENSE file for details.

Metadata

Release files for thx 0.7.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for thx 0.7.0
File Size Uploaded
thx-0.7.0.tar.gz 24.3 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for thx 0.7.0
File Interpreter ABI Platform
thx-0.7.0-py3-none-any.whl Python 3 none any Details

Total release size: 54.1 kB

Release files / thx-0.7.0.tar.gz

Download URL thx-0.7.0.tar.gz
Size 24.3 kB
Tags Source
SHA-256 checksum
How to use checksums
7da5a9a10c9f60ac5306f0ac9a44f029b46f7edb02f7e3e584900d691de80a0c
BLAKE2b-256 checksum
How to use checksums
1d8e3f1c738d544aadb1b026ee20c198f8333e407de18b15c2f1f4e4e3d3e719
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.12.8

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Feb 8, 2025.

Transparency log

Release files / thx-0.7.0-py3-none-any.whl

Download URL thx-0.7.0-py3-none-any.whl
Size 29.7 kB
Tags Python 3
SHA-256 checksum
How to use checksums
7d465a37f5ffee188ecb5b69a5dbe6cb28a8599f61c9de83e7886417e7fc4f18
BLAKE2b-256 checksum
How to use checksums
e82c7b94eed5b545c6743a617ef73389a4a6c25ca1aa24e332ca80fcaa1c43a2
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.12.8

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Feb 8, 2025.

Transparency log

Release history Release notifications | RSS feed

This release

0.7.0 This release

2 release files

0.6.0

2 release files

0.5.1

2 release files

0.5.0

2 release files

0.4.0

2 release files

0.3.0

2 release files

0.2.0

2 release files

0.1.0

2 release files

0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page