skillfed

iniparse

Accessing and Modifying INI files

iniparse v0.5 403.6K downloads/30d#6,916 on PyPI18
Permissive license MIT Active released

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 on this page — 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

iniparse on PyPI

pip

pip install iniparse

uv

uv add iniparse

poetry

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 not specified
Install friction low — pure-Python wheel
Runtime dependencies 1 — six
Maintenance actively maintained — 2,389 days since the last release
Last repo commit
First released
Downloads 403,554/month — #6,916 on PyPI (30-day window, as of 2026-08-14)
Known vulnerabilities none known (OSV.dev, checked 2026-08-14)

Evidence: iniparse-0.5-py2-none-any.whl; iniparse-0.5-py3-none-any.whl

Development Status :: 5 - Production/StableIntended Audience :: DevelopersLicense :: OSI Approved :: MIT LicenseLicense :: OSI Approved :: Python Software Foundation LicenseOperating System :: OS IndependentProgramming Language :: PythonProgramming Language :: Python :: 2Programming Language :: Python :: 2.6Programming Language :: Python :: 2.7Programming Language :: Python :: 3Programming Language :: Python :: 3.3Programming Language :: Python :: 3.4Topic :: Software Development :: Libraries :: Python Modules

Tags

ini file parser pythonconfig file parser preserve formattingconfigparser alternativeini file structure preservationdotted notation config accessini parser maintain commentspython config file reader
config-file-parsingstructure-preservingini-format

More Python Modules packages