An INI parser or config parser
Project description
iniparser2
iniparser2 is An INI parser or a Config parser.
this package is the improved version of iniparser with more features.
Quick Start
Installation
to install the package see the following step below
pip install iniparser2
|| python -m pip install iniparser2
from source: python setup.py install
Examples
test.ini
:
name = Mike Hawk
test.py
:
from iniparser2 import INI
x = INI('test.ini')
data = x.read()
print(data)
Output:
{'name': 'Mike Hawk'}
using with
keyword
test.ini
:
name = Mike Hawk
test.py
:
from iniparser2 import INI
with INI('test.ini') as i:
print(i.read())
Output:
{'name': 'Mike Hawk'}
parse without file
import iniparser2
x = """
name = Mike Hawk
"""
x = iniparser2.parse(x)
print(x)
INI binary format
import iniparser2
ex_data = {
"slots": 20,
"name": "no"
}
x = iniparser2.INI_BIN('test.ini')
x.write(ex_data)
data = x.read()
print(data)
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
iniparser2-1.9.4.tar.gz
(3.7 kB
view hashes)
Built Distribution
Close
Hashes for iniparser2-1.9.4-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 6c497e0e3e03bd706969a7409f4d3760400409d15d00751f33336d98308dfe72 |
|
MD5 | d34ead32f256be89aa639c26467e1e89 |
|
BLAKE2b-256 | 5d241a59699d4402de6bcb274f5fceead22a38005970217ad2406ef6bca1b9ae |