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.2.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.2-py3-none-any.whl (3.5 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: telepop_env-0.1.2.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.2.tar.gz
Algorithm Hash digest
SHA256 22c56ed65ac293b22e738e7bb5008a85c6c735921ecb2a2efa5b9a6baa44933b
MD5 d573893d51992f0f7908baf8bd91e48d
BLAKE2b-256 8cc25c6521a60c92ca4afe0b2c44555f077f63ff2a5232ac684af54c3c79380d

See more details on using hashes here.

File details

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

File metadata

  • Download URL: telepop_env-0.1.2-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.2-py3-none-any.whl
Algorithm Hash digest
SHA256 704207bb3d9c2cf965dc76a3dd51487351ba224d3eb5c99d44cb6a3e36b48065
MD5 bd7c62deb8ae9d57bfca1c015dc8d387
BLAKE2b-256 07a0927898b9b8456d53fef3e7388ec58e75e42dfa677f4607ed7850078f1b46

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