Skip to main content

A utility module for handling app settings.

Project description

https://img.shields.io/pypi/v/ycsettings.svg https://readthedocs.org/projects/ycsettings/badge/?version=latest

ycsettings is a utility module for handling app settings. It simplifies the searching of multiple sources (i.e., environment, files, etc) for settings and configuration variables.

Example

parser = ArgumentParser(description='Hello World!')
parser.add_argument('settings_uri', type=str, metavar='<config_file>', help='Positional option')
A = parser.parse_args()

settings_dict = {'A': 5}

settings = Settings(A, settings_dict, 's3://example/settings.yaml', search_first=['env', 'env_settings_uri'], warn_missing=False)

print(settings.getint('A', default=5, raise_exception=True))

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Files for ycsettings, version 0.1.5
Filename, size File type Python version Upload date Hashes
Filename, size ycsettings-0.1.5.tar.gz (13.2 kB) File type Source Python version None Upload date Hashes View

Supported by

Pingdom Pingdom Monitoring Google Google Object Storage and Download Analytics Sentry Sentry Error logging AWS AWS Cloud computing DataDog DataDog Monitoring Fastly Fastly CDN DigiCert DigiCert EV certificate StatusPage StatusPage Status page