Python config parser library
Project description
Python Config Parser Library
![license] ![pypi] ![pyversions]
confparser is a pure yml parser for python
Installation
pip3 install confparser
Usage
Create yml file
debug: True
server:
dev:
debug: True
port: 8000
prod:
debug: False
port: 80
Import confparser and insert your yml file.
from confparser import ConfParser
config = ConfParser(path='./config.yml').to_obj()
print(config.debug)
# True
print(config.server.dev.debug)
# True
print(config.server.dev.port)
# 8000
print(config.server.prod.debug)
# False
print(config.server.prod.port)
# 80
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
confparser-0.1.0.tar.gz
(2.3 kB
view hashes)