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(".env")
>>> {"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.12.tar.gz (6.8 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.12-py3-none-any.whl (4.8 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: dotenvplus-0.0.12.tar.gz
  • Upload date:
  • Size: 6.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.9.9 {"installer":{"name":"uv","version":"0.9.9"},"python":null,"implementation":{"name":null,"version":null},"distro":null,"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

File hashes

Hashes for dotenvplus-0.0.12.tar.gz
Algorithm Hash digest
SHA256 d22894d0493b2e4edc0772904c07bbf763733edf726d3f37bd2d12e0669c130e
MD5 ba2c95bf093bc65d9aac3bfd76c4ded7
BLAKE2b-256 34cda7760a442e4a131e8f0c71ae724cf5ed4414ca9cf5588e1409fc626b6f75

See more details on using hashes here.

File details

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

File metadata

  • Download URL: dotenvplus-0.0.12-py3-none-any.whl
  • Upload date:
  • Size: 4.8 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.9.9 {"installer":{"name":"uv","version":"0.9.9"},"python":null,"implementation":{"name":null,"version":null},"distro":null,"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

File hashes

Hashes for dotenvplus-0.0.12-py3-none-any.whl
Algorithm Hash digest
SHA256 b5da23d5fa15a03996468b0e2c983cc32b049acb723fe3707584f2b088c21b6f
MD5 35b34d028796eb9f7f4dfe54199112b9
BLAKE2b-256 677c93705daa5d013a5c9a1caf6ff59b310da3c9c49e972f01cbd217c052fc49

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