skillfed

ConfigUpdater

Parser like ConfigParser but for updating configuration files

configupdater v3.2 6.1M downloads/30d#1,967 on PyPI75
Permissive license MIT Active released

What it is and what it does

ConfigUpdater is a specialized INI file editor that complements Python's built-in ConfigParser. While ConfigParser is designed for reading config files and writing new ones from scratch, ConfigUpdater solves the narrower but important problem of surgically updating existing INI files—changing only the values you specify while leaving everything else untouched. It preserves comments, the order of sections and keys, and the original letter casing, making it safe for workflows where config files are version-controlled or hand-edited.

You read a file with `read()` or `read_string()`, then access sections and keys using dictionary-like syntax to modify values, add new options with positioning control, insert comments, or remove entries. The package validates the result against ConfigParser before writing, ensuring the modified file remains valid INI. It deliberately omits features like value interpolation, default section propagation, and type conversion—keeping the scope focused on non-destructive updates.

Use it for:

  • Update version numbers or metadata in setup.cfg or pyproject.toml without reformatting the entire file.
  • Add configuration options to an existing INI file while preserving hand-written comments and section order.
  • Programmatically modify deployment or application config files in CI/CD pipelines without losing formatting.
  • Rename configuration keys or sections while keeping the file structure and comments intact.
  • Insert new sections with comments at specific positions in a config file for documentation or feature flags.

Worth the install?

AI-flagged interpretation of the facts on this page — verify before relying

ConfigUpdater reads and modifies INI configuration files while preserving comments, section order, key order, and original casing—changes only what you explicitly update.

Yes. ConfigUpdater fills a genuine gap: it's the right tool when you need to update INI files programmatically without destroying their structure or comments. Low install friction, permissive license, active maintenance, no known vulnerabilities, and a focused scope make it a safe, reliable choice for config file automation.

Install

configupdater on PyPI

pip

pip install configupdater

uv

uv add configupdater

poetry

poetry add configupdater

Installing ConfigUpdater

Before you install

Low friction: pure Python wheel with a single lightweight runtime dependency (importlib-metadata). Actively maintained with recent commits; last release was 991 days ago but repository remains active.

License in practice

MIT license (permissive): you can use, modify, and distribute this package freely in commercial and private projects with minimal restrictions.

Quickstart

pip install configupdater

from configupdater import ConfigUpdater

updater = ConfigUpdater()
updater.read("setup.cfg")
updater["metadata"]["author"].value = "New Author"
updater.update_file()

Verify before relying

  • Whether the package handles edge cases like malformed INI files or unusual whitespace patterns gracefully.
  • Performance characteristics when working with very large configuration files.

Package facts

License MIT (permissive)
Python support supports the current Python release (>=3.6)
Install friction low — pure-Python wheel
Runtime dependencies 1 — importlib-metadata
Maintenance actively maintained — 991 days since the last release
Last repo commit
First released
Downloads 6,127,072/month — #1,967 on PyPI (30-day window, as of 2026-08-14)
Known vulnerabilities none known (OSV.dev, checked 2026-08-14)

Evidence: ConfigUpdater-3.2-py2.py3-none-any.whl

Development Status :: 5 - Production/StableIntended Audience :: DevelopersLicense :: OSI Approved :: MIT LicenseOperating System :: MacOSOperating System :: Microsoft :: WindowsOperating System :: OS IndependentOperating System :: POSIX :: LinuxOperating System :: UnixProgramming Language :: Python :: 3Programming Language :: Python :: 3 :: OnlyProgramming Language :: Python :: 3.6Programming Language :: Python :: 3.7Programming Language :: Python :: 3.8Topic :: Software Development :: Libraries :: Python Modules

Tags

ini config file editorpreserve comments when updating confignon-destructive config modificationconfigparser alternative for editingmaintain config file formatting
config-managementini-parser

More Python Modules packages