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.1.5.tar.gz
(9.6 kB
view hashes)
Built Distribution
Close
Hashes for yni-0.1.5-cp38-cp38-manylinux_2_31_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | bba890a59ec705e12b4a1f3bd633d3b8ddc632428e4a1be88530066a0b67f779 |
|
MD5 | cdce8dd2116de234a7daa8359fee4675 |
|
BLAKE2b-256 | 74102ce69903871f22a090c52697b0903a80fa49fc41d5182e7fb21e13157d26 |