Load env files in your tox envs.
Project description
tox-envfile
Load env files in your tox envs.
For installation instructions see INSTALL.md.
For how to set up a tox-envfile development environment see HACKING.md.
tox-envfile reads environment variables from a file named .devdata.env
in the
same directory as your tox.ini
file and adds them to the environment that tox
runs your commands in.
This is a pretty dumb plugin for now: all of the environment variables in
.devdata.env
will be loaded into the environment for every tox env that you
run, unconditionally. Any existing envvars with conflicting names will be
overwritten. Only a single environment file is supported and it must be named
.devdata.env
.
env File Format
python-dotenv is used for the env file parsing.
The .devdata.env
file should be an env file with contents that look like
this:
# a comment that will be ignored.
REDIS_ADDRESS=localhost:6379
MEANING_OF_LIFE=42
MULTILINE_VAR="hello\nworld"
Or like this:
export S3_BUCKET=YOURS3BUCKET
export SECRET_KEY=YOURSECRETKEYGOESHERE
POSIX variable expansion works, using variables from the environment or from earlier lines in the env file:
CONFIG_PATH=${HOME}/.config/foo
DOMAIN=example.org
EMAIL=admin@${DOMAIN}
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
Built Distribution
Hashes for tox_envfile-0.0.3-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | f26b660460ce91705fbd86e742e25ed23739c2ef1266a011cbe84df8cf291ae7 |
|
MD5 | 7e599f9a5cb34777d46b9c4f62354c09 |
|
BLAKE2b-256 | 727add0947d5f5293eae6a4dadbae56cac7ed3a68d2538fa292fd2563ad08958 |