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.4.tar.gz
(8.3 kB
view hashes)
Built Distribution
Close
Hashes for yni-0.0.4-cp310-cp310-manylinux_2_35_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | f4b971a281414fc077aa71aff869b3490d01f91fcaf14ef210db90c9db36449e |
|
MD5 | 4c6c9078f6db4650aacf0e8c6bc2cd8d |
|
BLAKE2b-256 | 9dd0ecfb642875dcffd5d07f7afbe85840d261bf35d61beaa8dd0e55387f9b57 |