Registry / devops / tox-toml-fmt

tox-toml-fmt

JSON →
library1.9.3pypypi✓ verified 85d ago

A tool to format your pyproject.toml file, specifically designed for tox configuration sections. Current version 1.9.3, requires Python >=3.10. Released as needed.

pip install tox-toml-fmt
INSTALL
IMPORT
SIG · TOX-TOML-FMT
T
tox-toml-fmt
devopspythonv1.9.3
harness data pending
Install & Compatibility
Where this runs

No compatibility data collected yet for this library.

Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

tox_toml_fmt
import tox_toml_fmt
The package is run as a command-line tool, so direct Python imports are not common. If you need to use it programmatically, import the module directly.

Run tox with the fmt-toml environment to format pyproject.toml. Ensure tox is installed and configured with an environment named 'fmt-toml' (usually provided by the plugin).

tox run -e fmt-toml
Debug
Known issues
gotchatox-toml-fmt is a tox plugin; it must be installed in the same environment as tox. Installing it separately may not work.
fix
Install tox-toml-fmt in the same Python environment as tox (e.g., global or virtual environment where tox is installed).
affects: all
gotchaThe tool will rewrite pyproject.toml, potentially changing formatting and order of keys. Always commit your original file or use version control before running.
fix
Run 'git add pyproject.toml' or backup before running the formatter. Review changes after formatting.
affects: all
deprecatedOlder versions of tox-toml-fmt (before 1.0) had a different invocation pattern. The current version uses tox environments.
fix
Use the official tox environment (e.g., 'tox run -e fmt-toml') instead of direct scripts.
affects: <1.0
Errors
Common errors & fixes
ModuleNotFoundError: No module named 'tox_toml_fmt'
The package is not installed or not in the same environment as tox.
fix
Install the package alongside tox: 'pip install tox tox-toml-fmt'
tox is not recognized as an internal or external command
tox is not installed.
fix
Install tox: 'pip install tox'
ERROR: unknown environment 'fmt-toml'
The tox configuration does not have a 'fmt-toml' environment. The plugin may not be correctly activated.
fix
Ensure tox-toml-fmt is installed: 'pip install tox-toml-fmt'. Check your tox.ini or pyproject.toml for proper plugin registration.
Upgrade
Version history
1.9.3latest on PyPI · released May 5, 2026
Audit
Dependencies
toxrequiredRequired for accessing tox's configuration model; tox-toml-fmt is a plugin for tox.
tomlioptionalUsed for TOML parsing in Python <3.11; for Python >=3.11, the standard library tomllib is used.
Agent activity
8 hits · last 30 days
node
8
Resources

No resource links recorded.

tox-toml-fmt — pip install tox-toml-fmt · libregistry