Skip to main content

No project description provided

Project description

TomlConfig

Toml configparser made (stupidly) simple.

install

python setup.py install

Usage

from tomlconfig import TomlConfig
config=TomlConfig("config.toml")
language=config.getChild("general.language")
size=config.getChild("general.editor.size")
font=config.getChild("general.editor").get("font")
fontWeight=config.getChild("general.editor").get("fontWeight",2)

config.hasChild("general.language") # True
config.hasSec("general") # True
config.hasSec("general.language") # False
config.addSec("otherSection")
config.addChild("general.theme", "simple") # add "theme=simple" to general

Assume the config.toml content is:

[general]
language = 'en'

[general.editor]
size = 12
font = 'arial'

Project details


Release history Release notifications

This version

1.0.0

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Files for TomlConfig, version 1.0.0
Filename, size File type Python version Upload date Hashes
Filename, size TomlConfig-1.0.0-py2.py3-none-any.whl (17.6 kB) File type Wheel Python version py2.py3 Upload date Hashes View hashes

Supported by

Elastic Elastic Search Pingdom Pingdom Monitoring Google Google BigQuery Sentry Sentry Error logging AWS AWS Cloud computing DataDog DataDog Monitoring Fastly Fastly CDN SignalFx SignalFx Supporter DigiCert DigiCert EV certificate StatusPage StatusPage Status page