Last updated:
0 purchases
pythondotenvrun 0.1.4
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
For personal and professional use. You cannot resell or redistribute these repositories in their original state.
There are no reviews.