Skip to main content

MiniMindsLab INI Section Order

Deterministically reorder INI sections and optionally keys within sections while preserving comments and formatting as much as possible.

Features

  • Reorders sections based on an explicit section order.
  • Places unspecified sections at the end, sorted deterministically by section name.
  • Optionally sorts keys within sections alphabetically.
  • Keeps comments and blank lines attached to their nearest logical location where possible.
  • Idempotent normalization (running twice yields identical output).

Install

This package is pure Python and standard library only.

Usage

from minimindslab_ini_section_order import normalize_ini

text = """# header
[b]
z = 2

[a]
y = 1
x = 0
"""

out = normalize_ini(text, section_order=["a", "b"], sort_keys=True)
print(out)

API

normalize_ini(text: str, section_order: list[str] | None = None, sort_keys: bool = False) -> str

  • text: INI content.
  • section_order: preferred section name order.
  • sort_keys: when True, key/value lines within each section are sorted by key name while preserving the original line text.

Returns normalized INI text.

Metadata

Release files for minimindslab-ini-section-order 0.1.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 minimindslab-ini-section-order 0.1.0
File Size Uploaded Provenance Actions
minimindslab_ini_section_order-0.1.0.tar.gz 4.2 kB Without provenance Details for minimindslab_ini_section_order-0.1.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for minimindslab-ini-section-order 0.1.0
File Interpreter ABI Platform Actions
minimindslab_ini_section_order-0.1.0-py3-none-any.whl Python 3 none any Details for minimindslab_ini_section_order-0.1.0-py3-none-any.whl

Total release size: 8.2 kB

Release files / minimindslab_ini_section_order-0.1.0.tar.gz

Download URL minimindslab_ini_section_order-0.1.0.tar.gz
Size 4.2 kB
Tags Source
SHA-256 checksum
How to use checksums
82f14c7b7b71d770f26a03400e1ea5892a39c645bc6ac838eff0930215c65e4e
BLAKE2b-256 checksum
How to use checksums
39f55ca7c17e102532274cd0cf360c111dcd573051e560ef21e4c7434f06ddb1
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via n8n

Release files / minimindslab_ini_section_order-0.1.0-py3-none-any.whl

Download URL minimindslab_ini_section_order-0.1.0-py3-none-any.whl
Size 4.0 kB
Tags Python 3
SHA-256 checksum
How to use checksums
97752743eacf79504de3624806297f59051d7086bf46589a690a33a23113f085
BLAKE2b-256 checksum
How to use checksums
5602c45ae2272e4c9e8e59ab609a8a34d28ca8c49d919deb85c51c44c2f9a14f
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via n8n

Security for minimindslab-ini-section-order 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.

Release history Release notifications | RSS feed

This release

0.1.0 This release

2 release files No provenance

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