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.0.tar.gz
(12.4 kB
view details)
Built Distribution
settei-0.5.0-py3-none-any.whl
(16.5 kB
view details)
File details
Details for the file settei-0.5.0.tar.gz
.
File metadata
- Download URL: settei-0.5.0.tar.gz
- Upload date:
- Size: 12.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 73e85ebe8b25342eeb44326a783e5e4c8e91f9a0efa696252af6241a21657826 |
|
MD5 | 9aac62e672daf27aa3722c5b48f9402c |
|
BLAKE2b-256 | 8cf4dba9a204fe4923aea0232765eb6c4379cdff2b65f4014c37a3e027b54ae1 |
File details
Details for the file settei-0.5.0-py3-none-any.whl
.
File metadata
- Download URL: settei-0.5.0-py3-none-any.whl
- Upload date:
- Size: 16.5 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | e2c252496e45c327b834cbffb36ee24dabcec8fa4c3271ca44c9ba661fe669a9 |
|
MD5 | 7c6340cc95ee3579d89594af6cd18d79 |
|
BLAKE2b-256 | f88cc0f7aa0f7f1ee6076d22f0c2fdd8ec0ec2cd2f8e55dce3f01534e4aedee0 |