Skip to main content

Manage your app configuration using env variables

Project description

Envia

Did you ever lose track of all environment variables you can use to configure a project? Envia is a simple utility that allows you to group them together.

Installation

pip install envia

Usage

You can use Envia as follows

# app/config.py

from envia import EnvVar

APP_DB_VENDOR = EnvVar("APP_DB_VENDOR", default="postgres")
APP_DB_PORT = EnvVar("APP_DB_PORT", default="5432")
APP_DB_HOST = EnvVar("APP_DB_HOST")

To use the environment values you can do

# app/db.py
import app.config as cfg

def connect():
	vendor = cfg.APP_DB_VENDOR.get_required()
	port = cfg.APP_DB_PORT.get_required()
	host = cfg.APP_DB_PORT.get_required()

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

envia-0.0.0.tar.gz (4.6 kB view details)

Uploaded Source

Built Distribution

envia-0.0.0-py3-none-any.whl (4.9 kB view details)

Uploaded Python 3

File details

Details for the file envia-0.0.0.tar.gz.

File metadata

  • Download URL: envia-0.0.0.tar.gz
  • Upload date:
  • Size: 4.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.9.12

File hashes

Hashes for envia-0.0.0.tar.gz
Algorithm Hash digest
SHA256 1b5751336059eb9ea4286f2980cdeecc2b8aa6e7f0a6891284f886370b0c62f6
MD5 56b214c16bdae02bbacabe37b02b5fec
BLAKE2b-256 e193de23e702c68d7bbc5c667db151e19bde2bfa1e4cfbb15c6653dbe1f9f366

See more details on using hashes here.

File details

Details for the file envia-0.0.0-py3-none-any.whl.

File metadata

  • Download URL: envia-0.0.0-py3-none-any.whl
  • Upload date:
  • Size: 4.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.9.12

File hashes

Hashes for envia-0.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 8c4aa6c2277fda26df30b73f21d26d90007c56eafa576ac3adb9ee81b4e8321e
MD5 28c1749a511a845490d3e93f7f80ea6c
BLAKE2b-256 03fe659ccebda06a8f99deac0a4bb036c1f1c7051d5ce5be5259da05c124b13b

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page