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.6.tar.gz
(16.3 kB
view details)
Built Distribution
settei-0.5.6-py3-none-any.whl
(24.0 kB
view details)
File details
Details for the file settei-0.5.6.tar.gz
.
File metadata
- Download URL: settei-0.5.6.tar.gz
- Upload date:
- Size: 16.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.23.0 setuptools/45.2.0 requests-toolbelt/0.9.1 tqdm/4.43.0 CPython/3.7.0
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 21a7d38954cc7c84f5481c963c5b6c825e72c74262e2872461e91d5ec077f744 |
|
MD5 | dbd4a0897359b461faef9eb7f92f6bac |
|
BLAKE2b-256 | 047db58a5bd307ca70569f5883153ff9ee66603a40760bd93fafbbf1f32dce90 |
File details
Details for the file settei-0.5.6-py3-none-any.whl
.
File metadata
- Download URL: settei-0.5.6-py3-none-any.whl
- Upload date:
- Size: 24.0 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.23.0 setuptools/45.2.0 requests-toolbelt/0.9.1 tqdm/4.43.0 CPython/3.7.0
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | cf51c457e8f695a9ebf5e4723fd1ea549e56f95ecc71928be5e39ab37612a45f |
|
MD5 | 4ae062896be900afee40b27dfa5858c9 |
|
BLAKE2b-256 | 7d8ba4e28fd158dacc1271d418729fb27458f7234d634c55617dd2dc7b791fdc |