This is a pre-production deployment of Warehouse, however changes made here WILL affect the production instance of PyPI.
Latest Version Dependencies status unknown Test status unknown Test coverage unknown
Project Description

When describing in python of the configuration file, you need to change it in each environment. For example settings.py of Django. This package provides the utility to assist it.

Install

$ pip install custom_settings

How to use it

settings_custom.py

AUTH_CREDENTIAL = 'MY_CREDENTIAL'
INTEGER_VALUE = '1'

Do the following to use this configuration file.

>>> import custom_settings
>>> custom = custom_settings.load('settings_custom')
>>> custom.get('AUTH_CREDENTIAL')
'MY_CREDENTIAL'

If you specified type_ argument, convert type to.

>>> custom.get('INTEGER_VALUE', type_=int, default=10)
1

If you specify True in use_environ, if it does not exist in settings_custom, acquired from the os.environ.

>>> custom.get('PS1', use_environ=True)
'$ '

If you specify default, if it does not exist in settings_custom, to used default.

>>> custom.get('NO_SET_VALUE', default=10)
10

If you specify True in raise_exception, if it does not exist in settings_custom, raise exception.

>>> custom.get('NO_SET_VALUE', use_environ=True, raise_exception=True)
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/envs/3.5/lib/python3.5/site-packages/custom_settings/adapters.py", line 40, in get
    raise exc.NoCustomSettingError('Not been set: {}'.format(name))
custom_settings.exc.NoCustomSettingError: Not been set: NO_SET_VALUE
Release History

Release History

1.0.post1

This version

History Node

TODO: Figure out how to actually get changelog content.

Changelog content for this version goes here.

Donec et mollis dolor. Praesent et diam eget libero egestas mattis sit amet vitae augue. Nam tincidunt congue enim, ut porta lorem lacinia consectetur. Donec ut libero sed arcu vehicula ultricies a non tortor. Lorem ipsum dolor sit amet, consectetur adipiscing elit.

Show More

1.0

History Node

TODO: Figure out how to actually get changelog content.

Changelog content for this version goes here.

Donec et mollis dolor. Praesent et diam eget libero egestas mattis sit amet vitae augue. Nam tincidunt congue enim, ut porta lorem lacinia consectetur. Donec ut libero sed arcu vehicula ultricies a non tortor. Lorem ipsum dolor sit amet, consectetur adipiscing elit.

Show More

Download Files

Download Files

TODO: Brief introduction on what you do with files - including link to relevant help section.

File Name & Checksum SHA256 Checksum Help Version File Type Upload Date
custom_settings-1.0.post1-py3-none-any.whl (8.6 kB) Copy SHA256 Checksum SHA256 py3 Wheel Sep 17, 2016
custom_settings-1.0.post1.tar.gz (5.7 kB) Copy SHA256 Checksum SHA256 Source Sep 17, 2016

Supported By

WebFaction WebFaction Technical Writing Elastic Elastic Search Pingdom Pingdom Monitoring Dyn Dyn DNS HPE HPE Development Sentry Sentry Error Logging CloudAMQP CloudAMQP RabbitMQ Heroku Heroku PaaS Kabu Creative Kabu Creative UX & Design Fastly Fastly CDN DigiCert DigiCert EV Certificate Rackspace Rackspace Cloud Servers DreamHost DreamHost Log Hosting