Metadata-Version: 2.5
Name: iiconf
Version: 0.0.2
Summary: Parse INI and .env text into plain dictionaries.
Project-URL: Homepage, https://github.com/lqxnjk/iiconf
Author: lqxnjk
License: MIT
License-File: LICENSE
Keywords: config,dotenv,env,ini,settings
Classifier: Development Status :: 3 - Alpha
Classifier: Intended Audience :: Developers
Classifier: License :: OSI Approved :: MIT License
Classifier: Operating System :: OS Independent
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3 :: Only
Classifier: Topic :: Software Development :: Libraries :: Python Modules
Classifier: Typing :: Typed
Requires-Python: >=3.10
Description-Content-Type: text/markdown

# iiconf

Read INI and `.env` files into plain dicts — no classes, no global state, no
environment mutation.

## Install

```console
pip install iiconf
```

## Usage

```python
from iiconf import load_config, parse_env, parse_ini

parse_env("""
# local settings
export HOST=localhost
PORT=5432
MOTTO="hello # not a comment"
""")
# {'HOST': 'localhost', 'PORT': '5432', 'MOTTO': 'hello # not a comment'}

parse_ini("""
key = before-section
[db]
host = localhost
port = 5432
""")
# {'': {'key': 'before-section'}, 'db': {'host': 'localhost', 'port': '5432'}}

load_config("settings.ini")
```

## Behaviour

| Aspect | Detail |
| --- | --- |
| Comments | `#` to end of line, except inside quotes |
| Quotes | surrounding `'` or `"` stripped |
| Separator | `=` or `:`, first occurrence only |
| Substitution | **not** performed, `${X}` stays literal |
| Unparseable line | `ValueError` |

Values stay strings on purpose: guessing whether `"0123"` is a number or an ID
is how leading zeros get lost.

## License

MIT
