--- id: iniparse version: "0.5" license: MIT license_treatment: permissive maintenance: active --- # iniparse — Accessing and Modifying INI files License: permissive · Maintenance: active · Downloads: 403.6K/mo ## What it is and what it does iniparse is a Python INI file parser designed to read and write configuration files while preserving their original structure—comments, blank lines, indentation, and section order remain intact when the file is modified. This is especially valuable for config files that are edited both by users and by programs, where reformatting would be disorienting. The package provides backward-compatible implementations of ConfigParser, RawConfigParser, and SafeConfigParser from the Python standard library, so it can be used as a drop-in replacement. It also offers more convenient access patterns: configuration values can be read using dotted notation (e.g., `cfg.user.name`) or standard dictionary syntax (e.g., `cfg['user']['name']`). The package depends only on six for Python 2/3 compatibility and installs with low friction. It has been stable since its 2007 release and is classified as Production/Stable. The repository is actively maintained but receives infrequent updates, reflecting its mature and settled state. Use it for: - Preserve user-edited INI files when a program needs to update configuration values programmatically - Build configuration management tools where maintaining file formatting and comments is important for user experience - Replace the standard ConfigParser in legacy Python projects that need structure preservation - Create image gallery or similar applications where the order of entries in a config file carries semantic meaning - Read and modify application settings files while keeping inline documentation and comments intact ## Worth the install? AI-flagged interpretation of the facts above — verify before relying. iniparse is an INI file parser that preserves formatting (comments, indentation, blank lines, section order) while providing ConfigParser-compatible and dotted-notation access to configuration values. Yes, if you need to read and write INI files while preserving formatting and comments. iniparse is stable, permissively licensed, has no known vulnerabilities, and installs easily. It is a solid choice for config file handling in projects where structure preservation matters. However, if you only need basic INI parsing without formatting concerns, Python's built-in configparser may suffice. ## Install pip install iniparse uv add iniparse poetry add iniparse ## Installing iniparse Before you install: Low install friction with a single runtime dependency (six). Maintained as active, though the latest release was in 2020 and the repository has minimal activity (18 stars). Suitable for stable, long-term use in projects that do not require frequent updates. License in practice: Licensed under MIT, a permissive open-source license. You may use, modify, and distribute iniparse freely in commercial and private projects with minimal restrictions. Quickstart: pip install iniparse from iniparse import INIConfig cfg = INIConfig(open('config.ini')) print(cfg.section.option) # dotted notation access Verify before relying: - Whether iniparse works reliably with modern Python versions beyond 3.4, given classifiers only list up to 3.4 - Performance characteristics when handling large INI files or frequent read/write cycles - Compatibility with edge cases in INI syntax (e.g., duplicate keys, special characters in values) ## Package facts - License: MIT (permissive) - Python support: unspecified - Install friction: low - Maintenance: active - Downloads: 403.6K/month (top 15,000 on PyPI) - Known vulnerabilities: none known ## Tags ini file parser python, config file parser preserve formatting, configparser alternative, ini file structure preservation, dotted notation config access, ini parser maintain comments, python config file reader, config-file-parsing, structure-preserving, ini-format [View on SkillFed](https://skillfed.io/packages/iniparse) · [View on PyPI](https://pypi.org/project/iniparse/)