[Chicago] Per virtualenv environment variables

Tim Saylor tim.saylor at gmail.com
Tue Jun 26 22:06:05 CEST 2012


If you use virtualenvwrapper then the pre- and post- activate scripts are
the way to do it.

On Sat, Jun 23, 2012 at 8:47 AM, Adam "Cezar" Jenkins <
emperorcezar at gmail.com> wrote:

> At work I'm working on a new infrastructure. For various reasons, I really
> like how Heroku does app local settings, but can't use Heroku. They are set
> in the environment variables. For instance, I would use the Heroku command
> like so
>
> heroku config:add aws_key=1234567890
>
> and I could pull that in side my Django settings file with env['aws_key']
>
> So I've been wondering what the best way is to set environment variables
> on a per virtualenv case? So far I've only come up with a custom activate
> script, or code in my Django app that updates the env dictionary using a
> .cfg or .yml file found in the virtualenv. I'm sure there's some python or
> bash magic that would make it easier?
>
> _______________________________________________
> Chicago mailing list
> Chicago at python.org
> http://mail.python.org/mailman/listinfo/chicago
>
>


-- 
Tim Saylor
@tsaylor
http://www.timsaylor.com/
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/chicago/attachments/20120626/a715244f/attachment.html>


More information about the Chicago mailing list