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.7.tar.gz (7.1 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.7-py3-none-any.whl (5.4 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: dotenvplus-0.0.7.tar.gz
  • Upload date:
  • Size: 7.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.7.12

File hashes

Hashes for dotenvplus-0.0.7.tar.gz
Algorithm Hash digest
SHA256 fc7abd160e297a48f115b19cd7d377401b4ff40ffe1f55eef0e99d10bd7749d9
MD5 98d6b62e2b9102539467607bd7447180
BLAKE2b-256 4f9421e1ff9a0fef0e2a09a7c52d720886945c70f7d910d47d00be39a27dc793

See more details on using hashes here.

File details

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

File metadata

  • Download URL: dotenvplus-0.0.7-py3-none-any.whl
  • Upload date:
  • Size: 5.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.7.12

File hashes

Hashes for dotenvplus-0.0.7-py3-none-any.whl
Algorithm Hash digest
SHA256 8e081cea258c99594a79bd465c7061e268f692ff2b31f46ccf8785d44fe26214
MD5 25600d4ac4e16ea2a47429c32066d4b1
BLAKE2b-256 6f08628c6f97b2bfdc447f0bebd93878152b05c4fed610c4a27a58700e1deb67

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