iiconf
Read INI and .env files into plain dicts — no classes, no global state, no
environment mutation.
Install
pip install iiconf
Usage
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
Metadata
Release files for iiconf 0.0.2
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| iiconf-0.0.2.tar.gz | 3.8 kB | Without provenance | Details for iiconf-0.0.2.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| iiconf-0.0.2-py3-none-any.whl | Python 3 | none | any | Details for iiconf-0.0.2-py3-none-any.whl |
Total release size: 7.9 kB
Release files / iiconf-0.0.2.tar.gz
| Download URL | iiconf-0.0.2.tar.gz |
|---|---|
| Size | 3.8 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
4105fb57e8afcd2cf99ec3699d5d14aaeba660f3ba1854e9993693a3616be4d0
|
|
BLAKE2b-256 checksum How to use checksums |
82a44618ef5aebda1df46448c4e763d7ea3d445d9c8a8407e3d6f4d907f2eb1c
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.10.11
|
Release files / iiconf-0.0.2-py3-none-any.whl
| Download URL | iiconf-0.0.2-py3-none-any.whl |
|---|---|
| Size | 4.1 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
651109fd59c9dc2939b68d885442806ee4c20b440fe37ab187d9141fa9979305
|
|
BLAKE2b-256 checksum How to use checksums |
0a3335d6aa937bfd07758e5fd313f0882fbc2a1794fd6488be67681c7bf75f9a
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.10.11
|
Security for iiconf 0.0.2
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.