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
A helping hand to manage your settings among different environments

## Intro

Managing application configuration that runs on multiple environments
can be tough. So, **envelop** comes to help you pretend you have only one
settings file that magically works whenever you deploy.

Here at Yipit, we use Chef to coordinate the deploy process and to maintain the
configuration, using attributes or data bags.

After that, we use [envdir](
to run our applications with variables set in Chef. Then, we use
**envelop** to read those variables and feed the application configuration

## Production

The system environment is the first place **envelop** will try to find
things. So, when the application runs inside of an environment with the right
variables set, it will just work.

So, if you know you have environment variables
`DATABASE_URI` and `ALLOWED_IPS` like this:

$ export DATABASE_URI=mysql://root@localhost:3306/mydb
$ export ALLOWED_IPS=,

The application settings glue code will look like this:

# steadymark:ignore
>>> from envelop import Environment
>>> env = Environment()
>>> dburi = env.get_uri('DATABASE_URI')
>>> dburi.port
>>> env.get_list('ALLOWED_IPS')
['', '']

## Local

If you just want to load things from a file locally, the
`Environment.from_file()` constructor will help you out.

# steadymark:ignore
>>> from envelop import Environment
>>> env = Environment.from_file('/etc/app.cfg')
>>> env.get_bool('BOOL_FLAG')
>>> env.get_float('FLOAT_VAL')

The file `app.cfg` will look like this:



## From a folder

You can also load variables from a folder, where each file will be an
environment variable and the file's content will be the value. Just like

Now, say that you have the folder `/etc/envdir/app` and this folder contains
the file `MYSQL_CONN_URI` with a database URL inside of it. Just like this one
here: `mysql://root:secret@localhost:3306/mydb`.

To read that directory and load the variable properly, you just have to do the

# steadymark:ignore
>>> from envelop import Environment
>>> env = Environment.from_folder('/etc/envdir/app')
>>> uri = env.get_uri('MYSQL_CONN_URI')
>>> uri.port
>>> uri.user
>>> uri.password

# Hacking on it

## Install dev dependencies

pip install -r requirements-dev.txt

## Run tests

make test

## Change it

Make sure you write tests for your new features and keep the test coverage in 100%

## Release it

After you already made your commits, run:

make release

follow the instructions and do the [harlem shake](
Release History

Release History


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

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
envelop-0.2.0.tar.gz (8.4 kB) Copy SHA256 Checksum SHA256 Source May 21, 2014

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