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.5.5.tar.gz
(14.6 kB
view details)
Built Distribution
settei-0.5.5-py3-none-any.whl
(17.8 kB
view details)
File details
Details for the file settei-0.5.5.tar.gz
.
File metadata
- Download URL: settei-0.5.5.tar.gz
- Upload date:
- Size: 14.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/1.11.0 pkginfo/1.4.2 requests/2.19.1 setuptools/39.0.1 requests-toolbelt/0.8.0 tqdm/4.25.0 CPython/3.7.0
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 1a244a83b64d7738d717dbe0b2f30d39979a6182bbe3672264a29e5b3fa6afac |
|
MD5 | a45a12308c8052ed4682d01fb5e9f8c7 |
|
BLAKE2b-256 | 353d3b7fdede67648799903d2b1c092bbc435cdaf5634763bdf5a8fe3e383e87 |
File details
Details for the file settei-0.5.5-py3-none-any.whl
.
File metadata
- Download URL: settei-0.5.5-py3-none-any.whl
- Upload date:
- Size: 17.8 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/1.11.0 pkginfo/1.4.2 requests/2.19.1 setuptools/39.0.1 requests-toolbelt/0.8.0 tqdm/4.25.0 CPython/3.7.0
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 4b9519a62cb4fbd673bac66288910132af20c10c59fb14a6f9699672ded294fb |
|
MD5 | 419a6a8a9b80d4070dfa482b35684077 |
|
BLAKE2b-256 | 2792cdd3dd1942496d020f2e27f40fc79b317872cb274d6eb76dbc933505ea5b |