This commit is contained in:
macbook_max
2026-10-15 20:36:59 +08:00
commit 6bf949949c
7923 changed files with 1369582 additions and 0 deletions
@@ -0,0 +1,84 @@
Metadata-Version: 2.4
Name: iniconfig
Version: 2.3.1
Summary: brain-dead simple config-ini parsing
Author-email: Ronny Pfannschmidt <opensource@ronnypfannschmidt.de>, Holger Krekel <holger.krekel@gmail.com>
License-Expression: MIT
Project-URL: Homepage, https://github.com/pytest-dev/iniconfig
Classifier: Development Status :: 4 - Beta
Classifier: Intended Audience :: Developers
Classifier: Operating System :: MacOS :: MacOS X
Classifier: Operating System :: Microsoft :: Windows
Classifier: Operating System :: POSIX
Classifier: Programming Language :: Python :: 3 :: Only
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Programming Language :: Python :: 3.13
Classifier: Programming Language :: Python :: 3.14
Classifier: Programming Language :: Python :: 3.15
Classifier: Topic :: Software Development :: Libraries
Classifier: Topic :: Utilities
Requires-Python: >=3.10
Description-Content-Type: text/x-rst
License-File: LICENSE
Dynamic: license-file
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/pytest-dev/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
use ``IniConfig.parse()`` to strip inline comments from values:
.. code-block:: pycon
>>> import iniconfig
>>> ini = iniconfig.IniConfig.parse("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
The ``IniConfig()`` constructor preserves inline comments in values for backward
compatibility. Use ``IniConfig.parse(..., strip_inline_comments=False)`` to
preserve them when using the parsing method.
@@ -0,0 +1,15 @@
iniconfig-2.3.1.dist-info/INSTALLER,sha256=zuuue4knoyJ-UwPPXg8fezS7VCrXJQrAP7zeNuwvFQg,4
iniconfig-2.3.1.dist-info/METADATA,sha256=R8LDXZNvXGSdgHTGRkcZpClmpntc660B4-V4TPCQz7Y,2826
iniconfig-2.3.1.dist-info/RECORD,,
iniconfig-2.3.1.dist-info/WHEEL,sha256=YVMoNqKzERt-wjUZwJ33xBGAwnFl-4cqbYkTtWa4itE,91
iniconfig-2.3.1.dist-info/licenses/LICENSE,sha256=NAn6kfes5VeJRjJnZlbjImT-XvdYFTVyXcmiN3RVG9Q,1098
iniconfig-2.3.1.dist-info/top_level.txt,sha256=7KfM0fugdlToj9UW7enKXk2HYALQD8qHiyKtjhSzgN8,10
iniconfig/__init__.py,sha256=uxyQF-6gBToQS9BwPz2NE-e5qFTko2TudlrWTaciCBk,7497
iniconfig/__pycache__/__init__.cpython-311.pyc,,
iniconfig/__pycache__/_parse.cpython-311.pyc,,
iniconfig/__pycache__/_version.cpython-311.pyc,,
iniconfig/__pycache__/exceptions.cpython-311.pyc,,
iniconfig/_parse.py,sha256=FYJKeBBbUqqe1BTOatBzlnxzvn6lrp2ZGg35em4MwuE,5113
iniconfig/_version.py,sha256=WReSJeYrf3ZiZ6YYojwQTQak-xZrogR46_PQphO8GQs,520
iniconfig/exceptions.py,sha256=mipQ_aMxD9CvSvFWN1oTXY4QuRnKAMZ1f3sCdmjDTU0,399
iniconfig/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
@@ -0,0 +1,5 @@
Wheel-Version: 1.0
Generator: setuptools (84.0.0)
Root-Is-Purelib: true
Tag: py3-none-any
@@ -0,0 +1,21 @@
The MIT License (MIT)
Copyright (c) 2010 - 2023 Holger Krekel and others
Permission is hereby granted, free of charge, to any person obtaining a copy of
this software and associated documentation files (the "Software"), to deal in
the Software without restriction, including without limitation the rights to
use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies
of the Software, and to permit persons to whom the Software is furnished to do
so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.