a lightweight ini parser
how to install
pip install ini.py
converts an ini file to a python dictionary
example ini file
; main section
[section]
key = value
key2 = "value2"
key3 = 'value3'
reading it using ini.py
import ini
text = open('config.ini', 'r').read()
config = ini.parse(text)
section = config['section']
print(section['key'], section['key2'], section['key3'])
output
value value2 value3
converting python dict to ini
import ini
config = ini.convert({"section": {"key": "value"}, "section2": {"key2": "value2"}})
print(config)
output
[section]
key = value
[section2]
key2 = value2
Release files for ini.py 0.0.5
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| ini.py-0.0.5.tar.gz | 2.0 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| ini.py-0.0.5-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 4.8 kB
Release files / ini.py-0.0.5.tar.gz
| Download URL | ini.py-0.0.5.tar.gz |
|---|---|
| Size | 2.0 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
8a7af81a9caa32c5c68d9f4b8624f5011bdd8e183af3844501325f5c2d2983bd
|
|
BLAKE2b-256 checksum How to use checksums |
e387fd8988b8266c22df91396df1ffab3efcc200cee7533b1e1ae2297ee8bb04
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.3.0 pkginfo/1.7.0 requests/2.25.1 setuptools/49.2.1 requests-toolbelt/0.9.1 tqdm/4.56.2 CPython/3.9.1
|
Release files / ini.py-0.0.5-py3-none-any.whl
| Download URL | ini.py-0.0.5-py3-none-any.whl |
|---|---|
| Size | 2.8 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
cba282c5cf500c1e2c645763dcb42870711c825366a85ee2b9075b77ec725ce4
|
|
BLAKE2b-256 checksum How to use checksums |
755a52e3b67e01c3375cdc693e9c592209dc716569f9050480f9b1ec3f773ca9
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.3.0 pkginfo/1.7.0 requests/2.25.1 setuptools/49.2.1 requests-toolbelt/0.9.1 tqdm/4.56.2 CPython/3.9.1
|