A parser for the yni config file.
Project description
yni
A parser for the yni config file.
Example
test.py
from yni import Yni
parser = Yni.from_file('example.yni') # here we parse from a file
parser['foo']['bar'] # get the value of the key "bar" from the header "foo", returns "spam"
# or
parser.foo.bar # returns "spam"
Example 2
test_2.py
from yni import Yni
string = """#foo
[
bar: spam
]"""
parser = Yni.from_string(string) # here we parse from a string
parser['foo']['bar'] # get the value of the key "bar" from the header "foo", returns "spam"
# or
parser.foo.bar # returns "spam"
yni file structure
example.yni
#foo
[
bar: spam
]
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
yni-0.0.3.tar.gz
(8.3 kB
view hashes)
Built Distribution
Close
Hashes for yni-0.0.3-cp310-cp310-manylinux_2_35_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 038aaa553162b66ea58d9ef95c9fae1d5a5d1d187e065866bdc933ffb8071909 |
|
MD5 | d42372b1a9c7866f798bd3ba3cd200b2 |
|
BLAKE2b-256 | 56aef3d6c4718b2bbafc3619bea72d7a11f99a6c946c4b5ae59ddabce20a141e |