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.

DotEnvPlus

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

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

Uploaded Python 3

File details

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

File metadata

  • Download URL: dotenvplus-0.0.3.tar.gz
  • Upload date:
  • Size: 6.2 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.3.tar.gz
Algorithm Hash digest
SHA256 8a0c4ede5bb7612182368b364746d25d6bee063fe28dec2a39092a8082199acc
MD5 9ff3d4c4e1525d7f32c10eaefb8cf7b4
BLAKE2b-256 21a77082abd3d0cf7548cb18ea56cfe40ceaab23a71f39010ae67027a75b0d42

See more details on using hashes here.

File details

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

File metadata

  • Download URL: dotenvplus-0.0.3-py3-none-any.whl
  • Upload date:
  • Size: 4.4 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.3-py3-none-any.whl
Algorithm Hash digest
SHA256 6cde8c40463c391976de89bb17f737bafe5c76941a3da0305547338be021afdb
MD5 9ea6b7bc428bea3bf6f41ddb20749957
BLAKE2b-256 96e779bf550827fbcec10856383eff415afc70dc95d3048e7413c4e9c520168d

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