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.4.0.tar.gz
(11.7 kB
view details)
Built Distribution
settei-0.4.0-py3-none-any.whl
(15.8 kB
view details)
File details
Details for the file settei-0.4.0.tar.gz
.
File metadata
- Download URL: settei-0.4.0.tar.gz
- Upload date:
- Size: 11.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | e22bf6ad02da770230ca68891c70c557624597ff4348961fbbf61101405b8180 |
|
MD5 | cd73a19c51a02a178bd2e681ddd7ba0a |
|
BLAKE2b-256 | cb01464cc5ded1756bf09909ae9092a9b3f1e994b6ddd15cbfef5e6564616a6f |
File details
Details for the file settei-0.4.0-py3-none-any.whl
.
File metadata
- Download URL: settei-0.4.0-py3-none-any.whl
- Upload date:
- Size: 15.8 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | e9b78040aa2eddb00619638880c752aa0a489894780c44948d221fa149c79077 |
|
MD5 | bb198e315c134ed1a5f288e610688099 |
|
BLAKE2b-256 | 86fe062c1524e9011cf8ad5bbbc349d6241e1d943809a3c4036cde0c7f7cfd90 |