envrun-python
Run command with specified environment-variable file
Install
pip install envrun-python
Usage
Run specifying environment variables in YAML format:
envrun -f env.yaml somecmd arg1 arg2
Or JSON, or .env format:
envrun -f .env somecmd arg1 arg2
Run within a python virtualenv:
envrun -e .venv pytest
That's basically it.
Note the .env format parser is taken from python-dotenv.