Wrapper to run programs with different env
Project description
Wrapper to run programs with modified environment variables loaded from given file. You can use runenv to manage your app settings using 12-factor principles.
You can use same environment file with runenv and with docker using env-file parameter
Free software: BSD license
Documentation: https://runenv.readthedocs.org.
Installation
In order to install use pip:
$ pip install -U runenv
Usage
Run from shell:
$ runenv env.development ./manage.py runserver
example env.development file:
BASE_URL=http://127.0.0.1:8000 DATABASE_URI=postgres://postgres:password@localhost/dbname SECRET_KEY=y7W8pbRcuPuAmgTHsJtEpKocb7XPcV0u # email settings EMAIL_HOST=smtp.mandrillapp.com EMAIL_PORT=587 EMAIL_HOST_USER=someuser EMAIL_HOST_PASSWORD=hardpassword EMAIL_FROM=dev@local.host EMAIL_USE_TLS=1
Similar projects
https://github.com/jezdez/envdir - runs another program with a modified environment according to files in a specified directory
https://github.com/theskumar/python-dotenv - Reads the key,value pair from .env and adds them to environment variable
History
0.1.4 (2015-06-15)
Check if file to run exists and is executable
0.1.3 (2015-06-01)
Support for env file comments by ‘#’
0.1.2 (2015-06-01)
Return code from runned command
0.1.1 (2015-05-31)
First release on PyPI.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Hashes for runenv-0.1.4-py2.py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | cefad7388dad9de4c6045e184dec26e8e20b34317daf44d1663006913b36684f |
|
MD5 | 310f9227673178620201fed3646a338d |
|
BLAKE2b-256 | 1c3111bed47c80d02481ff17c93e22230cbaac438447d2caad913e9f0fd0e7eb |