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.1.tar.gz
(12.7 kB
view details)
Built Distribution
settei-0.5.1-py3-none-any.whl
(15.1 kB
view details)
File details
Details for the file settei-0.5.1.tar.gz
.
File metadata
- Download URL: settei-0.5.1.tar.gz
- Upload date:
- Size: 12.7 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 | 495226e58de82a6509c0ae47a9c806f0236177bd04f9bb8f8fd4c169e136f162 |
|
MD5 | cb9a7c65c2b51797af9c1e0b672138b8 |
|
BLAKE2b-256 | 2a4dffb0c1de0f81f0d7e746298d0b44c3ee5b6da6b2c1d7c86eaa24ad50fae3 |
File details
Details for the file settei-0.5.1-py3-none-any.whl
.
File metadata
- Download URL: settei-0.5.1-py3-none-any.whl
- Upload date:
- Size: 15.1 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 | 9647ef16caffc1269e76baf679ecee7cc12d49085ea049ebba63fa1218c181f0 |
|
MD5 | c2fa4a4fcb884e49a39ab2f1c2920cd4 |
|
BLAKE2b-256 | 07a1e3edc5a441e27a3d356159c9143bbe8ff6ce5e26468474514c8b31043d93 |