Skip to content

V0.1.1

Latest
Compare
Choose a tag to compare
@Microndgt Microndgt released this 09 Apr 03:43

support ini, py and yaml config file. You can load config like this:

import pyconf
c = pyconf.load('tests/sample.conf', config_class=pyconf.IniConfig)
print(c['path'])
c = pyconf.load('tests/sample.py', config_class=pyconf.PyConfig)
print(c['path'])
c = pyconf.load('tests/sample.yml', config_class=pyconf.YamlConfig)
print(c['path'])

and you can load config file without knowing the config type, just load it(not sure whether it will success 🤣):

import pyconf
c = pyconf.load('tests/sample.conf')
print(c['path'])