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.2.tar.gz
(8.2 kB
view hashes)
Built Distribution
Close
Hashes for yni-0.0.2-cp310-cp310-manylinux_2_35_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | cac3167c2724242272f667cdb652df98320b1b885106a1e492c99132173bc928 |
|
MD5 | e1159f00fd44542d99f14b879ca53e71 |
|
BLAKE2b-256 | 8ecf8c63d37d2d64b0008f030c212ad2e8d8bc8bf4beaeb35b0df22a56d99922 |