ConfigUpdater
Parser like ConfigParser but for updating configuration files
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 configupdateruv
uv add configupdaterpoetry
poetry add configupdaterInstalling 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
Tags
More Python Modules packages
Converts domain names between Unicode and…
permissive · top 100 on PyPI
setuptoolsSetuptools is a Python build backend and…
permissive · top 100 on PyPI
PyYAMLPyYAML parses and emits YAML 1.1 data format,…
permissive · top 100 on PyPI
pydanticPydantic validates Python data structures…
permissive · top 100 on PyPI
annotated-typesProvides reusable metadata objects for use with…
permissive · top 100 on PyPI
typing-inspectionProvides runtime tools to inspect and…
permissive · top 100 on PyPI
commented-configparserExtends Python's standard ConfigParser to…
permissive · top 15,000 on PyPI
config-formatterAutomatically formats .ini and .cfg…
permissive · top 15,000 on PyPI
iniparseiniparse is an INI file parser that preserves…
permissive · top 15,000 on PyPI
imperfectParses and edits configparser-compatible INI…
permissive · top 15,000 on PyPI
configobjConfigObj reads, writes, and validates…
permissive · top 5,000 on PyPI
iniconfiginiconfig parses INI configuration files while…
permissive · top 100 on PyPI
configparser2Backport of Python 3's configparser module to…
permissive · top 15,000 on PyPI
click-configfileExtends click with configuration file support,…
permissive · top 15,000 on PyPI
condor-git-configProvides an executable hook that fetches…
permissive · top 15,000 on PyPI
configparserProvides an updated ConfigParser implementation…
permissive · top 5,000 on PyPI