Skip to main content

Wrapper to run programs with different env

Project description

https://img.shields.io/travis/onjin/runenv.svg https://img.shields.io/pypi/v/runenv.svg https://img.shields.io/badge/license-New%20BSD-blue.svg https://img.shields.io/pypi/dm/runenv.svg

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

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

History

0.2.0 (2015-06-16)

  • add load_env (python api)

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


Download files

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

Source Distribution

runenv-0.2.0.tar.gz (13.3 kB view hashes)

Uploaded Source

Built Distribution

runenv-0.2.0-py2.py3-none-any.whl (5.1 kB view hashes)

Uploaded Python 2 Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page