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.3.tar.gz
(14.3 kB
view details)
Built Distribution
settei-0.5.3-py3-none-any.whl
(17.5 kB
view details)
File details
Details for the file settei-0.5.3.tar.gz
.
File metadata
- Download URL: settei-0.5.3.tar.gz
- Upload date:
- Size: 14.3 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 | cf576b2474d1f94f947da95c417dafcaa367de44feb4bd274b126af464e910f0 |
|
MD5 | 83855a8b3d41fb288553314a3abbd181 |
|
BLAKE2b-256 | d8560b58ce0a7df9e8f8c6778d1461e27db3b40ba26dc6676c962e69d639a8c6 |
File details
Details for the file settei-0.5.3-py3-none-any.whl
.
File metadata
- Download URL: settei-0.5.3-py3-none-any.whl
- Upload date:
- Size: 17.5 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 | e9256a18bfeb6b55bb4b90420525318c4ca018c3202fdb97f205c870428dca1a |
|
MD5 | 5b03e4b60efe41c374bb612e3eb692a4 |
|
BLAKE2b-256 | feabfdc26c6038002909e0a63e7d7fe350f6f38cbb81979fc5848214c58cc1f1 |