--- id: configupdater version: "3.2" license: MIT license_treatment: permissive maintenance: active --- # ConfigUpdater — Parser like ConfigParser but for updating configuration files License: permissive · Maintenance: active · Downloads: 6.1M/mo ## 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 above — 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 pip install configupdater uv add configupdater 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_current - Install friction: low - Maintenance: active - Downloads: 6.1M/month (top 5,000 on PyPI) - Known vulnerabilities: none known ## Tags ini config file editor, preserve comments when updating config, non-destructive config modification, configparser alternative for editing, maintain config file formatting, config-management, ini-parser [View on SkillFed](https://skillfed.io/packages/configupdater) · [View on PyPI](https://pypi.org/project/configupdater/)