env-tools
A simple module for loading and applying .env files.
Works in Python 2 and Python 3.
Running tests
$ py.test
Or, with tox (test with multiple Python versions):
$ tox
Example
.env
VARIABLE_A=123
VARIABLE_B="testing, testing"
example.py
import os
from env_tools import apply_env
# loads '.env' by default, to load another file use
# apply_env(load_env('filename'))
apply_env()
assert os.environ['VARIABLE_A'] == '123'
assert os.environ['VARIABLE_B'] == 'testing, testing'
Metadata
Release files for env-tools 2.4.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| env_tools-2.4.0.tar.gz | 2.9 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| env_tools-2.4.0-py2.py3-none-any.whl | Python 2, Python 3 | none | any | Details |
Total release size: 5.6 kB
Release files / env_tools-2.4.0.tar.gz
| Download URL | env_tools-2.4.0.tar.gz |
|---|---|
| Size | 2.9 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
5979fb0486d428e0659865335385990f9776f27b05346dcdcfbd290ab9ff9b4a
|
|
BLAKE2b-256 checksum How to use checksums |
fcfe6e1f798aad787e15105c61236bf3f201a1408a2bf067d6962545e5c2f974
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.0.1 CPython/3.13.0
|
Release files / env_tools-2.4.0-py2.py3-none-any.whl
| Download URL | env_tools-2.4.0-py2.py3-none-any.whl |
|---|---|
| Size | 2.7 kB |
| Tags | Python 2 Python 3 |
|
SHA-256 checksum How to use checksums |
3a927635eef0fa32ff33e89b244519b3e924227ba372d46f6f32629faf5c404f
|
|
BLAKE2b-256 checksum How to use checksums |
80d28c9b21a7c8e8195105baef25f5f50bdfd41dbae318004244939484485d73
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.0.1 CPython/3.13.0
|