a lightweight ini parser
Project description
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
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
ini.py-0.0.4.tar.gz
(2.0 kB
view details)
Built Distribution
File details
Details for the file ini.py-0.0.4.tar.gz
.
File metadata
- Download URL: ini.py-0.0.4.tar.gz
- Upload date:
- Size: 2.0 kB
- Tags: Source
- Uploaded using 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
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 66747439c62a2cb541614bccc489d0a05751c31d5992a550586686c018b2622c |
|
MD5 | 30da15e7bf7fd86a25f89de85beacf63 |
|
BLAKE2b-256 | 35095f122d52a07cb26b373deaa9d022801ded06833b96ce084faa1d4257179e |
Provenance
File details
Details for the file ini.py-0.0.4-py3-none-any.whl
.
File metadata
- Download URL: ini.py-0.0.4-py3-none-any.whl
- Upload date:
- Size: 2.8 kB
- Tags: Python 3
- Uploaded using 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
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 0d490620468259d3df4a72d70cf0ec89fd5e69e464729b6fb955d92d964f10fe |
|
MD5 | b1faaa6ed5cc7285f165464526420cf7 |
|
BLAKE2b-256 | 8ea58f0f19000bf991584b0a48c6e136498f817db967b5c99b440229f11d7770 |