Registry / serialization / toml-fmt-common

toml-fmt-common

JSON →
library1.3.2pypypiunverified

toml-fmt-common is an internal utility library providing common logic for TOML formatters within the `toml-fmt` project, such as `pyproject-fmt` and `tox-toml-fmt`. While a PyPI package exists (current version 1.3.2), its primary purpose is as a dependency for other tools, not for direct end-user interaction. The development of its code has moved into the `tox-dev/toml-fmt` monorepo, where it is actively maintained as part of a larger ecosystem with frequent releases for its consuming projects.

pip install toml-fmt-common
INSTALL
IMPORT
SIG · TOML-FMT-COMMON
T
toml-fmt-common
serializationpythonv1.3.2
harness data pending
Install & Compatibility
Where this runs

No compatibility data collected yet for this library.

Code
Verified usage

This library is intended for internal use by other `toml-fmt` projects (e.g., `pyproject-fmt`, `tox-toml-fmt`) and does not provide a public API for direct consumption by end-users. Attempting to use it directly may result in unstable or undocumented behavior.

# toml-fmt-common is primarily an internal library and not designed for direct end-user import or standalone quickstart usage.
Debug
Known issues
gotchaThis library is explicitly noted as 'meant to only be used by that project' (referring to the toml-fmt umbrella). Direct import and usage by end-users is not recommended and may lead to unexpected behavior or API instability, as its internal structure can change without warning.
fix
Instead of `toml-fmt-common`, use higher-level tools like `pyproject-fmt` or `tox-toml-fmt` which are designed for user interaction.
affects: All versions
deprecatedThe standalone `tox-dev/toml-fmt-common` GitHub repository is deprecated. Its code and development have been migrated into the `tox-dev/toml-fmt` monorepo. While the PyPI package `toml-fmt-common` still exists and is updated, active development happens within the monorepo structure.
fix
For the latest source code and development, refer to `https://github.com/tox-dev/toml-fmt/tree/main/toml-fmt-common`.
affects: All versions of the standalone repository
gotchaPast issues have included panics when encountering non-array nodes in array operations and unintended write checks in `--check` and `--stdout` modes. While fixes have been applied, this highlights the potential for internal logic quirks if directly interacting with the library's components outside of its intended `toml-fmt` ecosystem.
fix
Ensure you are using the latest versions of `pyproject-fmt` or `tox-toml-fmt` to benefit from these internal fixes. Avoid direct manipulation of `toml-fmt-common`'s internals.
affects: <= 1.3.1 (fixed in subsequent releases of `pyproject-fmt`/`tox-toml-fmt` that consume `toml-fmt-common`)
Errors
Common errors & fixes
ModuleNotFoundError: No module named 'toml_fmt_common'
The `toml-fmt-common` library is an internal utility designed as a dependency for other tools, not for direct end-user interaction or standalone import.
fix
Do not import `toml_fmt_common` directly. Instead, utilize the public interfaces of its consuming projects, such as `pyproject-fmt` or `tox-toml-fmt`, to format TOML files.
AttributeError: module 'toml_fmt_common' has no attribute 'format_toml'
Users attempting to directly call formatting functions on the `toml_fmt_common` module will encounter an AttributeError because it provides internal components, not a direct public API for formatting.
fix
To format TOML files, use the dedicated command-line tools or public Python APIs provided by `pyproject-fmt` or `tox-toml-fmt`, which wrap `toml-fmt-common`'s internal logic.
ImportError: cannot import name 'TomlFormatter' from 'toml_fmt_common.formatter'
Attempting to import internal classes or submodules from `toml-fmt-common` directly will fail, as these components are part of its internal implementation and not exposed as a stable public API.
fix
Avoid direct imports of internal components. For TOML formatting needs, use the higher-level tools like `pyproject-fmt` or `tox-toml-fmt` that are built upon `toml-fmt-common`.
Upgrade
Version history
1.3.2latest on PyPI · released Mar 20, 2026
Audit
Dependencies
pythonrequiredRequires Python 3.10 or newer.
Agent activity
12 hits · last 30 days
node
10
OpenAI (training)
1
Resources
toml-fmt-common — pip install toml-fmt-common · libregistry