| Name | iniconfig JSON |
| Version |
2.2.0
JSON |
| download |
| home_page | None |
| Summary | brain-dead simple config-ini parsing |
| upload_time | 2025-10-18 20:23:58 |
| maintainer | None |
| docs_url | None |
| author | None |
| requires_python | >=3.10 |
| license | None |
| keywords |
|
| VCS |
 |
| bugtrack_url |
|
| requirements |
No requirements were recorded.
|
| Travis-CI |
No Travis.
|
| coveralls test coverage |
No coveralls.
|
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']
>>> ini.get('section1', 'notexist', [], lambda x: x.split(","))
[]
>>> [x.name for x in list(ini)]
['section1', 'section2']
>>> list(list(ini)[0].items())
[('name1', 'value1'), ('name1b', 'value1,value2')]
>>> 'section1' in ini
True
>>> 'inexistendsection' in ini
False
Raw data
{
"_id": null,
"home_page": null,
"name": "iniconfig",
"maintainer": null,
"docs_url": null,
"requires_python": ">=3.10",
"maintainer_email": null,
"keywords": null,
"author": null,
"author_email": "Ronny Pfannschmidt <opensource@ronnypfannschmidt.de>, Holger Krekel <holger.krekel@gmail.com>",
"download_url": "https://files.pythonhosted.org/packages/8e/11/2f7713979d561602e14b8fdd99a0e2e8ff2d901de1041c42a23a4c33f2c3/iniconfig-2.2.0.tar.gz",
"platform": null,
"description": "iniconfig: brain-dead simple parsing of ini files\n=======================================================\n\niniconfig is a small and simple INI-file parser module\nhaving a unique set of features:\n\n* maintains order of sections and entries\n* supports multi-line values with or without line-continuations\n* supports \"#\" comments everywhere\n* raises errors with proper line-numbers\n* no bells and whistles like automatic substitutions\n* iniconfig raises an Error if two sections have the same name.\n\nIf you encounter issues or have feature wishes please report them to:\n\n https://github.com/RonnyPfannschmidt/iniconfig/issues\n\nBasic Example\n===================================\n\nIf you have an ini file like this:\n\n.. code-block:: ini\n\n # content of example.ini\n [section1] # comment\n name1=value1 # comment\n name1b=value1,value2 # comment\n\n [section2]\n name2=\n line1\n line2\n\nthen you can do:\n\n.. code-block:: pycon\n\n >>> import iniconfig\n >>> ini = iniconfig.IniConfig(\"example.ini\")\n >>> ini['section1']['name1'] # raises KeyError if not exists\n 'value1'\n >>> ini.get('section1', 'name1b', [], lambda x: x.split(\",\"))\n ['value1', 'value2']\n >>> ini.get('section1', 'notexist', [], lambda x: x.split(\",\"))\n []\n >>> [x.name for x in list(ini)]\n ['section1', 'section2']\n >>> list(list(ini)[0].items())\n [('name1', 'value1'), ('name1b', 'value1,value2')]\n >>> 'section1' in ini\n True\n >>> 'inexistendsection' in ini\n False\n",
"bugtrack_url": null,
"license": null,
"summary": "brain-dead simple config-ini parsing",
"version": "2.2.0",
"project_urls": {
"Homepage": "https://github.com/pytest-dev/iniconfig"
},
"split_keywords": [],
"urls": [
{
"comment_text": null,
"digests": {
"blake2b_256": "13713970abe530a7a15e406874a30ed6cf1ead266444b4503ebb2f68b4d98f30",
"md5": "a6e96926f6896a63dc1113d24e12b96a",
"sha256": "eeea4a571b616cf2951fbeeda9490863f3d1882a21cf673cd3236545488d6f1e"
},
"downloads": -1,
"filename": "iniconfig-2.2.0-py3-none-any.whl",
"has_sig": false,
"md5_digest": "a6e96926f6896a63dc1113d24e12b96a",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": ">=3.10",
"size": 6228,
"upload_time": "2025-10-18T20:23:57",
"upload_time_iso_8601": "2025-10-18T20:23:57.492796Z",
"url": "https://files.pythonhosted.org/packages/13/71/3970abe530a7a15e406874a30ed6cf1ead266444b4503ebb2f68b4d98f30/iniconfig-2.2.0-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": null,
"digests": {
"blake2b_256": "8e112f7713979d561602e14b8fdd99a0e2e8ff2d901de1041c42a23a4c33f2c3",
"md5": "9b26b3dc5b58de889eb51e2a700280a4",
"sha256": "1807d2bc2eb4231a5e40e2ecee093fc25fc0eb0e2840f01ea50a1d15380adbff"
},
"downloads": -1,
"filename": "iniconfig-2.2.0.tar.gz",
"has_sig": false,
"md5_digest": "9b26b3dc5b58de889eb51e2a700280a4",
"packagetype": "sdist",
"python_version": "source",
"requires_python": ">=3.10",
"size": 18227,
"upload_time": "2025-10-18T20:23:58",
"upload_time_iso_8601": "2025-10-18T20:23:58.576472Z",
"url": "https://files.pythonhosted.org/packages/8e/11/2f7713979d561602e14b8fdd99a0e2e8ff2d901de1041c42a23a4c33f2c3/iniconfig-2.2.0.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2025-10-18 20:23:58",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "pytest-dev",
"github_project": "iniconfig",
"travis_ci": false,
"coveralls": false,
"github_actions": true,
"lcname": "iniconfig"
}