Skip to main content

Tools for using .env files in Python

Project description

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'

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

env-tools-1.0.tar.gz (2.0 kB view details)

Uploaded Source

Built Distribution

env_tools-1.0-py2.py3-none-any.whl (3.4 kB view details)

Uploaded Python 2 Python 3

File details

Details for the file env-tools-1.0.tar.gz.

File metadata

  • Download URL: env-tools-1.0.tar.gz
  • Upload date:
  • Size: 2.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No

File hashes

Hashes for env-tools-1.0.tar.gz
Algorithm Hash digest
SHA256 77045162a7a41df5ad0b9a9302d138c04831d7e32c085171e7d6a81d09532e92
MD5 74fc2c2af977e6efda96b4eb0237428d
BLAKE2b-256 a9722d081a1289f57f549d18e9d7c0e0c84db63bb8d3c9939fb4302f37ff1031

See more details on using hashes here.

File details

Details for the file env_tools-1.0-py2.py3-none-any.whl.

File metadata

File hashes

Hashes for env_tools-1.0-py2.py3-none-any.whl
Algorithm Hash digest
SHA256 357cfdf807d137c800c5993af2e441bebad7ebe5f88839beaa334af077676bbd
MD5 07823f51841031401fe5f850400c7c10
BLAKE2b-256 d9a1cde686cffae3f0a218e4b3b9bce86a6cb5dad97796f69b4f8c88157364d4

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page