Skip to main content

Environment Variables

Project description

MyENV: Environment Variable Parsing with Types

package

MIT License PyPI Wheel Supported Python Versions PyPI Version CalVer v201809.0002-beta

tests

Build Status Checked with mypy Code Coverage

MyENV parses you’re environment variables using types and defaults declared like this:

import myenv
import dblib

class DBEnv(myenv.BaseEnv):

    host      : str  = "127.0.0.1"
    port      : int  = 5432
    name      : str  = "app_db_v1"
    user      : str  = "myuser"
    password  : str
    read_only : bool = True

# parse from os.environ
dbenv = myenv.parse(DBEnv)

conn = dblib.connect(
    dbname=dbenv.name,
    user=dbenv.user,
    password=dbenv.password,
    port=dbenv.port,
    read_only=dbenv.read_only,
)

Changelog for pycalver

v201809.0001-alpha

  • Initial release

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distributions

No source distribution files available for this release.See tutorial on generating distribution archives.

Built Distribution

myenv-201809.1b0-py36.py37-none-any.whl (3.4 kB view details)

Uploaded Python 3.6 Python 3.7

File details

Details for the file myenv-201809.1b0-py36.py37-none-any.whl.

File metadata

  • Download URL: myenv-201809.1b0-py36.py37-none-any.whl
  • Upload date:
  • Size: 3.4 kB
  • Tags: Python 3.6, Python 3.7
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.11.0 pkginfo/1.4.2 requests/2.19.1 setuptools/40.2.0 requests-toolbelt/0.8.0 tqdm/4.25.0 CPython/3.7.0

File hashes

Hashes for myenv-201809.1b0-py36.py37-none-any.whl
Algorithm Hash digest
SHA256 0ef35ccbefe83ce39250d1601cff06f05ef0a279f873cb737cca1c3b74b185fc
MD5 8ff5b8a79fc696320d6d67384f47364f
BLAKE2b-256 736ddba5a7bea1ff463ca7bc692a5eca37a2aa341e362a502f59144672d9d0b2

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