Skip to main content

Reads key-value pairs from a .env file and supports multiple values with dynamic interpolation.

Project description

DotEnvPlus

Reads key-value pairs from a .env file and supports multiple values with dynamic interpolation.

The values returned by the DotEnv object is treated like a dictionary, so you can use it like a normal dictionary. Some of the usual dictionary methods are also supported like .items(), .keys(), .values(), etc.

Goal is to make it easy to use environment variables in your code, while also supporting multiple values.

Installing

You need Python >=3.7 to use this library.

pip install dotenvplus

Usage

# .env
KEY1=value
KEY2=123
KEY3=true
# main.py
from dotenvplus import DotEnv

# Create a DotEnv object
env = DotEnv()
>>> <DotEnv data={"KEY1": "value", "KEY2": 123, "KEY3": True}>

# Call it like a dictionary
(env["KEY1"], env["KEY2"], env["KEY3"])
>>> ("value", 123, True)

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

dotenvplus-0.0.5.tar.gz (6.5 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

dotenvplus-0.0.5-py3-none-any.whl (4.7 kB view details)

Uploaded Python 3

File details

Details for the file dotenvplus-0.0.5.tar.gz.

File metadata

  • Download URL: dotenvplus-0.0.5.tar.gz
  • Upload date:
  • Size: 6.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.11.4

File hashes

Hashes for dotenvplus-0.0.5.tar.gz
Algorithm Hash digest
SHA256 7e4a5096f00d5f2ea9c433efe9e9f21e4b237648fa237d4b6aad0e31b2c8d0e3
MD5 f9c2d78bb2f970f40cc9873644d3b8a1
BLAKE2b-256 18b34d4428473e8b27e812bebe34c7471af7108eb572a91bb039945335bc441c

See more details on using hashes here.

File details

Details for the file dotenvplus-0.0.5-py3-none-any.whl.

File metadata

  • Download URL: dotenvplus-0.0.5-py3-none-any.whl
  • Upload date:
  • Size: 4.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.11.4

File hashes

Hashes for dotenvplus-0.0.5-py3-none-any.whl
Algorithm Hash digest
SHA256 657f805aa665e9e358edb95bf4839ddd8f4e69eecffcd583d336c02be0960dbf
MD5 46218408372989494ee1cf9a65350005
BLAKE2b-256 a59364b0a8a08adf582fe1e75b956b486c1d683cbb9281451e4a1e0ed7a4c450

See more details on using hashes here.

Supported by

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