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.7.2.tar.gz
(20.4 kB
view details)
Built Distribution
settei-0.7.2-py3-none-any.whl
(20.5 kB
view details)
File details
Details for the file settei-0.7.2.tar.gz
.
File metadata
- Download URL: settei-0.7.2.tar.gz
- Upload date:
- Size: 20.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.2.0 pkginfo/1.6.0 requests/2.23.0 setuptools/46.0.0 requests-toolbelt/0.9.1 tqdm/4.51.0 CPython/3.8.2
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | bcadc65dbd5270b28ab3ec8a33190a074de2d9b4dd18d3b592eac8ca3c713163 |
|
MD5 | 30cd6d48eab5cfee7d0ff0fd7cfeafb8 |
|
BLAKE2b-256 | d0412549546234de9adc73af9fe34b7b1d1a5590cb2a133b6d2ff4bc50c0c35b |
File details
Details for the file settei-0.7.2-py3-none-any.whl
.
File metadata
- Download URL: settei-0.7.2-py3-none-any.whl
- Upload date:
- Size: 20.5 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.2.0 pkginfo/1.6.0 requests/2.23.0 setuptools/46.0.0 requests-toolbelt/0.9.1 tqdm/4.51.0 CPython/3.8.2
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 217bde93b76f54afd8087bac9e3e4685ac2490883f88a57aab8a56b1db144332 |
|
MD5 | 895dbd37ab2c31470b31f58be2fb526b |
|
BLAKE2b-256 | 5b0819521e92164dbf4ad131cf3b3cd767554fcb3c4c5c7c33c2497dc551c9cf |