Skip to main content

This package provides a minimal class for settings management.

Project description

It allows to save and retrieve configuraton settings from a json file.

  • usage: - from prettysettings import Settings - settings = Settings(defaults = {‘option1’: 1, ‘option2’: ‘myoption’}, filename=’./settings.json’) - print(settings.option1)

  • if any of the settings is found in env variables than it is overridden

  • override order is: - first read from defaults - then override from file - last override from env variables

  • type: - defaults dict is used as reference for type parsing when loading from env variables

  • keys: - defaults dict is used as reference to load keys from file and from env variables - a key found in the file (or env vars) which is not present in the defaults is discarded

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

prettysettings-1.1.tar.gz (2.1 kB view hashes)

Uploaded Source

Built Distributions

prettysettings-1.1-py3.4.egg (4.3 kB view hashes)

Uploaded Source

prettysettings-1.1-py2.7.egg (4.1 kB view hashes)

Uploaded Source

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