Skip to main content

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)

Source distribution for env-tools 2.4.0
File Size Uploaded
env_tools-2.4.0.tar.gz 2.9 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for env-tools 2.4.0
File Interpreter ABI Platform
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

Release history Release notifications | RSS feed

This release

2.4.0 This release

2 release files

2.3.0

2 release files

2.2.0

2 release files

2.1.0

2 release files

2.0.0

2 release files

1.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page