Skip to main content

Tiny zero-dependency environment variable loader with type casting and .env.example generation

Project description

telepop_env [tinyenv]

Tinyenv zero-dependency environment variable loader for Python.
Reads .env + os.environ, supports type casting, validation, and .env.example generation.


Features:

Zero dependencies

Automatic type casting (bool, int, float, str)

Required variable check

.env.example generation from used variables

Install

pip install telepop_env

usage

from telepop_env import env

DEBUG = env.bool("DEBUG", default=False)
DB_PORT = env.int("DB_PORT", required=True)
DB_URL = env.str("DB_URL", default="sqlite:///:memory:")

print(DEBUG, DB_PORT, DB_URL)

generate .env with

from telepop_env import env
# call function
env.generate_example()

result will be like

DEBUG=true
DB_PORT=5432

Pypi page:

https://pypi.org/project/telepop-env/

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

telepop_env-0.1.3.tar.gz (3.2 kB view details)

Uploaded Source

Built Distribution

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

telepop_env-0.1.3-py3-none-any.whl (3.5 kB view details)

Uploaded Python 3

File details

Details for the file telepop_env-0.1.3.tar.gz.

File metadata

  • Download URL: telepop_env-0.1.3.tar.gz
  • Upload date:
  • Size: 3.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.12.9

File hashes

Hashes for telepop_env-0.1.3.tar.gz
Algorithm Hash digest
SHA256 12e27db168a24d512bc8265b977c0d8a05cc268dc5bc6836d0b913f854d89e56
MD5 ab9b35b713cd9ea87f89205742afee05
BLAKE2b-256 2934309238da1b2722a1c654fe12d3c5210c939fa8a2b19c3374f2d43d1ff912

See more details on using hashes here.

File details

Details for the file telepop_env-0.1.3-py3-none-any.whl.

File metadata

  • Download URL: telepop_env-0.1.3-py3-none-any.whl
  • Upload date:
  • Size: 3.5 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.12.9

File hashes

Hashes for telepop_env-0.1.3-py3-none-any.whl
Algorithm Hash digest
SHA256 20715e668dccdaa08d704190574c33ac1f251b154c25bf84a25fdce7450f4a0b
MD5 c2ec897b53677ca10d827d6323ef53e5
BLAKE2b-256 0d956acd0da306d520b0422bcb2616698046cc32c6271130955beda39119995c

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