Skip to main content

Configuration loader from a TOML file

Project description

Documentation Status https://badge.fury.io/py/settei.svg https://travis-ci.org/spoqa/settei.svg

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


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.5.tar.gz (14.6 kB view hashes)

Uploaded Source

Built Distribution

settei-0.5.5-py3-none-any.whl (17.8 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page