--- id: iniconfig version: "2.3.0" license: MIT license_treatment: permissive maintenance: active --- # iniconfig — brain-dead simple config-ini parsing License: permissive · Maintenance: active · Popularity: top 100 on PyPI ## Install pip install iniconfig uv add iniconfig poetry add iniconfig ## Description iniconfig: brain-dead simple parsing of ini files ======================================================= iniconfig is a small and simple INI-file parser module having a unique set of features: * maintains order of sections and entries * supports multi-line values with or without line-continuations * supports "#" comments everywhere * raises errors with proper line-numbers * no bells and whistles like automatic substitutions * iniconfig raises an Error if two sections have the same name. If you encounter issues or have feature wishes please report them to: https://github.com/RonnyPfannschmidt/iniconfig/issues Basic Example =================================== If you have an ini file like this: .. code-block:: ini # content of example.ini [section1] # comment name1=value1 # comment name1b=value1,value2 # comment [section2] name2= line1 line2 then you can do: .. code-block:: pycon >>> import iniconfig >>> ini = iniconfig.IniConfig("example.ini") >>> ini['section1']['name1'] # raises KeyError if not exists 'value1' >>> ini.get('section1', 'name1b', [], lambda x: x.split(",")) ['value1', 'value2']... ## AI interpretation — verify before relying iniconfig parses INI configuration files with order preservation, multi-line value support, and line-number error reporting, without automatic substitutions or complex features. Verdict: iniconfig is a lightweight, actively maintained INI parser with zero dependencies, MIT licensing, and no known vulnerabilities. It is well-suited for projects needing straightforward configuration file parsing with order preservation and clear error reporting. [View on SkillFed](https://skillfed.io/packages/iniconfig) · [View on PyPI](https://pypi.org/project/iniconfig/)