$npx skillfedfor your agent

commented-configparser

A custom ConfigParser class that preserves comments and most formatting when writing loaded config out.

With conditionsPyPI UtilitiesReleased Jun 2025501.4K downloads / moMITPure Python

Decision gist · record as of 2026-08-14

pure-Python wheel — commented_configparser-3.0.0-py3-none-any.whl
v3.0.0 · released 2025-06-22 · Python >=3.9

Yes, if you need to programmatically edit INI configuration files while preserving comments. The package is lightweight, has no dependencies, and solves a real gap in the standard library. Maintenance is aging but the repository is not abandoned; consider it stable for its narrow use case. No known security issues.AI-flagged interpretation of the facts on this page — verify before relying

Before you install

  • Requires Python 3.9 or later.
  • Low friction: pure Python wheel with no runtime dependencies.
  • Maintenance is aging—last release was 418 days ago, though the repository remains active and the package supports current Python versions (3.9+).

License · maintenance · safety

MIT (permissive) — MIT license is permissive; you can use, modify, and distribute this package freely with minimal restrictions.

last release 2025-06-22 (418 days) · last repo commit 2025-10-11 · 10 stars

0 known vulnerabilities (OSV.dev, 2026-08-14) · 501,381 downloads/mo, #6,315 on PyPI

Verify before relying

from commentedconfigparser import CommentedConfigParser

config = CommentedConfigParser()
config.read("myconfig.ini")
# modify config as needed
with open("myconfig.ini", "w") as f:
    config.write(f)
  • Whether indentation outside multi-line values is truly lost or recoverable in edge cases.
  • Performance characteristics when handling very large configuration files.
  • Compatibility with ConfigParser subclasses or custom interpolation schemes.
Same gist for agents: .md · .json

What it is and what it does

commented-configparser is a drop-in replacement for Python's standard library ConfigParser that preserves comments and most formatting when you read and write configuration files. When you load an INI file, modify it, and save it back, your original comments stay in place—a feature the standard library discards. The package normalizes spacing around assignment operators and does not preserve indentation outside of multi-line values, but it retains both hash and semicolon comments, blank lines between sections, and trailing comments.

You use it exactly like the standard ConfigParser: instantiate it, call read() to load a file, modify the configuration as needed, and call write() to save it back. It has no external dependencies and runs on Python 3.9 and later, making it a lightweight addition to projects that need to edit configuration files while respecting user comments.

Use it for

  • Edit application config files programmatically while preserving user comments and structure.
  • Build configuration management tools that round-trip INI files without losing documentation.
  • Maintain configuration templates where comments explain each setting to end users.
  • Update config values in scripts while keeping inline and section-level comments intact.
  • Generate or modify INI files from code and have them remain human-readable and annotated.

Worth the install?

AI-flagged interpretation of the facts on this page. Verify before relying on it.

With conditions

Yes, if you need to programmatically edit INI configuration files while preserving comments.

The package is lightweight, has no dependencies, and solves a real gap in the standard library. Maintenance is aging but the repository is not abandoned; consider it stable for its narrow use case. No known security issues.

Install

commented-configparser on PyPI

Before you install

Low friction: pure Python wheel with no runtime dependencies. Maintenance is aging—last release was 418 days ago, though the repository remains active and the package supports current Python versions (3.9+).

Requires Python 3.9 or later.

License in practice

MIT license is permissive; you can use, modify, and distribute this package freely with minimal restrictions.

Quickstart

from commentedconfigparser import CommentedConfigParser

config = CommentedConfigParser()
config.read("myconfig.ini")
# modify config as needed
with open("myconfig.ini", "w") as f:
    config.write(f)

Verify before relying

  • Whether indentation outside multi-line values is truly lost or recoverable in edge cases.
  • Performance characteristics when handling very large configuration files.
  • Compatibility with ConfigParser subclasses or custom interpolation schemes.

Package facts

LicenseMIT permissive
Python supportSupports the current Python release >=3.9
Install frictionLow. Pure-Python wheel
Runtime dependenciesNone
MaintenanceAging 418 days since the last release
Last repo commit
First released
Downloads501,381 / month, #6,315 on PyPI 30-day window, as of 2026-08-14
Known vulnerabilitiesNone known OSV.dev, checked 2026-08-14
Classifiers
Programming Language :: Python :: 3Programming Language :: Python :: 3 :: OnlyProgramming Language :: Python :: Implementation :: CPython

Evidence: commented_configparser-3.0.0-py3-none-any.whl

Tags

Capabilities
configparser preserve commentsini file comment preservationconfig file formatting retentioncommented config parserini parser with commentsconfiguration file editormaintain config comments
Topics
config-managementini-files

Let your AI agent find packages like this

Example. Real query, live index.

You found this page by searching. An agent finds it by wishing: SkillFed indexes 14,416 PyPI packages by what they can do, searchable in plain language.

wish › “configparser preserve comments”

  • commented-configparserExtends Python's standard ConfigParser to preserve comments and…
  • imperfectParses and edits configparser-compatible INI files while preserving…
  • ConfigUpdaterConfigUpdater reads and modifies INI configuration files while…

Give your agent the search over MCP, or paste the wish link into any chat.

More Utilities packages

idna Worth it
PyPI · Python Modules · released Jun 2026

Converts domain names between Unicode and ASCII-compatible encoding (Punycode) according to IDNA 2008 and Unicode Technical Standard 46, with security validation and broader script coverage than the standard library.

Install it if you work with internationalized domain names, need to validate domains, or use HTTP clients that depend on it transitively.

BSD-3-Clausepure Python · 3.9+
1.8Bdownloads / mo
charset-normalizer Worth it
PyPI · Utilities · released Aug 2026

Detects and normalizes text encoding from unknown or ambiguous sources, supporting all IANA character sets that Python's core library provides codecs for, with the ability to register custom codecs.

permissive licensepure Python · 3.7+
1.7Bdownloads / mo
setuptools Worth it
PyPI · Python Modules · released Aug 2026

Setuptools is a Python build backend and package management tool that handles building, distributing, and installing Python packages, including support for C/C++ extension modules.

MITpure Python · 3.10+
1.6Bdownloads / mo
pluggy Worth it
PyPI · Libraries · released May 2025

Pluggy provides a plugin system that lets you define hook specifications and register implementations to be called in sequence, enabling extensible Python applications without tight coupling.

Install it if you're building an extensible application or framework.

MITpure Python · 3.9+aging
1.3Bdownloads / mo
Pygments Worth it
PyPI · Utilities · released Mar 2026

Pygments is a syntax highlighter that colorizes source code and text in over 500 languages and formats, outputting to HTML, LaTeX, RTF, SVG, images, or ANSI terminal sequences.

Install it if you need to display or transform source code.

BSD-2-Clausepure Python · 3.9+
1.3Bdownloads / mo
six With conditions
PyPI · Libraries · released Dec 2024

Six provides utility functions to write Python code that runs on both Python 2.7 and Python 3.3+, smoothing over language differences between the two versions.

MITpure Python
1.2Bdownloads / mo

See also config-formatter · configobj · ConfigUpdater · iniparse · iniconfig · ConfigArgParse · imperfect · ast-comments · comment-parser · jsoncomment