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.1.tar.gz
(19.1 kB
view details)
Built Distribution
settei-0.7.1-py3-none-any.whl
(26.2 kB
view details)
File details
Details for the file settei-0.7.1.tar.gz
.
File metadata
- Download URL: settei-0.7.1.tar.gz
- Upload date:
- Size: 19.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.23.0 setuptools/41.2.0 requests-toolbelt/0.9.1 tqdm/4.43.0 CPython/3.8.0
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 0da831ec4329d53e1c7cf754c8c45b8dd91cd32e4b1016e9c6435148c7e674b3 |
|
MD5 | e3ed0e8509e3de1672d446e19d6a3190 |
|
BLAKE2b-256 | fd0b6e88106e4ebeac3d6a10a40bbffdc536de2e5d15aeba694a108e84cba022 |
File details
Details for the file settei-0.7.1-py3-none-any.whl
.
File metadata
- Download URL: settei-0.7.1-py3-none-any.whl
- Upload date:
- Size: 26.2 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/41.2.0 requests-toolbelt/0.9.1 tqdm/4.43.0 CPython/3.8.0
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | da6b3df394df36ae5a0516c55860a4164cd4810352e53d939cd5b48efc16d6f3 |
|
MD5 | 0bfef02b2db871833a8bafdca45191a7 |
|
BLAKE2b-256 | 4d7295a7cec8598a4d434b614739aed0a86da9826daf30fc33ee9076e51b2187 |