Configuration loader from a TOML file
Project description
Configuration utility for common Python applications and services. FYI, “settei” (設定) means settings in Japanese. :)
Loading a configuration is easy
Suppose you use Flask with Settei.
from flask import Flask
from settei import Configuration, config_property
class WebConfiguration(Configuration):
"""Load Configuration::
[web]
debug = true
"""
#: debug option
debug = config_property('web.debug', bool, default=False)
conf = WebConfiguration.from_path(pathlib.Path('.') / 'dev.toml')
app = Flask(__name__)
if __name__ == '__main__':
app.run(debug=conf.debug)
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
settei-0.3.0.tar.gz
(9.1 kB
view details)
Built Distribution
settei-0.3.0-py3-none-any.whl
(13.8 kB
view details)
File details
Details for the file settei-0.3.0.tar.gz
.
File metadata
- Download URL: settei-0.3.0.tar.gz
- Upload date:
- Size: 9.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 1ac432b5ec66424d2adf362d76ac629b5caf5d9153a2393c83ed3ae13d428611 |
|
MD5 | 41d7402789dbc63b5f9a31d5745ea5d7 |
|
BLAKE2b-256 | 7aac5972a7f765fba742483369465f1b8ca4b0a6b2ea3449f493bbbf746aed19 |
File details
Details for the file settei-0.3.0-py3-none-any.whl
.
File metadata
- Download URL: settei-0.3.0-py3-none-any.whl
- Upload date:
- Size: 13.8 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | f44cd26664f40b7fd8a67458595b50e93bc7da40c26060dff57b97057e4c8562 |
|
MD5 | 8daa4f239fe39eefea1d7bb4fe2e0375 |
|
BLAKE2b-256 | 60fee363ee101b4ed61d04503a9a6178cea13a8697325ffdbf850b912ddd3506 |