Skip to main content

A good SQLian like a good shepherd.

Project description

Run command with environment variables populated by python-dotenv.

Installation

If using Pipenv:

pipenv install --dev python-dotenv-run

Otherwhise:

pip install python-dotenv-run

Instruction onwards assumes you use Pipenv. If you do not, simply drop the pipenv run prefix in all commands.

Usage

Say you have a Flask app in a file named webapp.py:

import flask

app = flask.Flask(__name__)

@app.route('/')
def hello():
    return "Hello World!"

Add a file named .env alongside with the project:

FLASK_APP=webapp.py

After installing dependencies, you can run it like this:

pipenv run dotenv-run flask run

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

python-dotenv-run-0.1.1.tar.gz (2.5 kB view details)

Uploaded Source

Built Distribution

python_dotenv_run-0.1.1-py2.py3-none-any.whl (4.3 kB view details)

Uploaded Python 2 Python 3

File details

Details for the file python-dotenv-run-0.1.1.tar.gz.

File metadata

File hashes

Hashes for python-dotenv-run-0.1.1.tar.gz
Algorithm Hash digest
SHA256 594720de2fdb85abd72229d4d627fac6dbf2bb4497860495c7ae049a2f4c5795
MD5 98e4bd44f1ce96209582c7c9f6d5dc05
BLAKE2b-256 df68befd72841d312b9ecb56dc4ecd6b4da4bb2c56f488ecf4f30d3bd354b6fd

See more details on using hashes here.

File details

Details for the file python_dotenv_run-0.1.1-py2.py3-none-any.whl.

File metadata

File hashes

Hashes for python_dotenv_run-0.1.1-py2.py3-none-any.whl
Algorithm Hash digest
SHA256 4420dbba26c887d31d5d3ba78875c4ec47425bd06c303b1cfa72af4e268c6c8f
MD5 37abff07a16cb530b7fe00f8e30cdae9
BLAKE2b-256 0c7fea39c2566bdc8eaa43062a516a75a317f4387d1a80310a3a28897c278240

See more details on using hashes here.

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