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

Uploaded Python 3

File details

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

File metadata

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

File hashes

Hashes for telepop_env-0.1.1.tar.gz
Algorithm Hash digest
SHA256 490df72fdb4a524e78bf6fa4de2946d5626fabec69e4e2415ff9610a6da2c120
MD5 e4073a2416bf3a71aa4d982eb8c4250f
BLAKE2b-256 d833d7f961fe22be7a7e019922fc10c044009d877b355dd892a93669e9790999

See more details on using hashes here.

File details

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

File metadata

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

File hashes

Hashes for telepop_env-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 f6b88b0a4e1f73d5bf90b91ee28bfc78bda23b5bc64923ba7e5d5af35fde32e4
MD5 b49f7ab63949efbf589d53ad45b45245
BLAKE2b-256 86f94f4111ad252fc58c09cbbeac890b924c20fd5ba874a046625b24031442c2

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