MiniMindsLab TOML Sort
Deterministically sort TOML keys in a stable, human-friendly order for small TOML files.
What it does
- Parses TOML text using Python's standard library (
tomllib). - Recursively sorts keys alphabetically for all tables.
- Produces stable output for the same logical TOML content.
- Preserves scalar values, arrays, booleans, numbers, and strings when parsed back.
Scope note
This package is intentionally tiny and pure-Python. It focuses on canonical key ordering and value preservation, not full formatting/comment round-trip fidelity.
Usage
from minimindslab_toml_sort import sort_toml_text
input_text = '''
[b]
z = 2
a = 1
[a]
k = "v"
'''
sorted_text = sort_toml_text(input_text)
print(sorted_text)
API
sort_toml_text(text: str) -> str- Returns sorted TOML text.
- Raises
ValueErroron invalid TOML input.
Metadata
Release files for minimindslab-toml-sort 0.1.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | |
|---|---|---|---|---|
| minimindslab_toml_sort-0.1.0.tar.gz | 4.1 kB | Without provenance | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| minimindslab_toml_sort-0.1.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 8.0 kB
Release files / minimindslab_toml_sort-0.1.0.tar.gz
| Download URL | minimindslab_toml_sort-0.1.0.tar.gz |
|---|---|
| Size | 4.1 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
cfdad72c89bd13c0b81763001854babfff3287f829ed909018b962c7c3bd01a6
|
|
BLAKE2b-256 checksum How to use checksums |
37b2b43f097b2df74d1c4f8520272cc5f6957e03e7cf8434c7321aa1ef0fe781
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
n8n
|
Release files / minimindslab_toml_sort-0.1.0-py3-none-any.whl
| Download URL | minimindslab_toml_sort-0.1.0-py3-none-any.whl |
|---|---|
| Size | 4.0 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
3b5e104b2e874e86f1a1ec045a6579065517aa9b6d4cc82d4008e5e1e4a4fc86
|
|
BLAKE2b-256 checksum How to use checksums |
ccea24a3c3a7fb1baf398d3f3ee463166097da88a3ca1eeb19bc8cb0c2f767d4
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
n8n
|
Security for minimindslab-toml-sort 0.1.0
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.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.