Skip to main content

Enviously elegant environment variable parsing

Project description

Parsenvy is an enviously elegant environment variable parsing Python library.

main Documentation Status Github Actions badgefury svg Unreleased chages License: BSD-3-Clause

Environment variables are strings by default. This can be rather inconvenient if you’re dealing with a number of them, and in a variety of desired types. Parsenvy aims to provide an intuitive, explicit interface for retrieving these values in appropriate types with human-friendly syntax.

Features

  • Compatible with Python 3.6+ only (the last Python 2 compatible version was 1.0.2).

  • Fully tested on Linux, macOS, and Windows.

  • No dependencies outside of the Python standard library.

  • BSD (3-Clause) licensed.

  • Utterly awesome.

  • Now with docs!

Examples

>>> import parsenvy
>>> parsenvy.bool('BOOL_ENV_VAR')  # BOOL_ENV_VAR=True
True
>>> parsenvy.int('INT_ENV_VAR')  # INT_ENV_VAR=13
13
>>> parsenvy.float('FLOAT_ENV_VAR')  # FLOAT_ENV_VAR=555.55
555.55
>>> parsenvy.list('LIST_ENV_VAR')  # LIST_ENV_VAR=shiver,me,timbers
['shiver', 'me', 'timbers']
>>> parsenvy.tuple('TUPLE_ENV_VAR')  # TUPLE_ENV_VAR=hello,world
('hello', 'world')
>>> parsenvy.str('STR_ENV_VAR')  # STR_ENV_VAR=meep
'meep'
>>> parsenvy.set('SET_ENV_VAR')  # SET_ENV_VAR=wat,wut,wot
set(['wat', 'wut', 'wot'])

Install

pip install parsenvy

Contributing

Contributions are welcome, and more information is available in the contributing guide.

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

Parsenvy-3.0.0.tar.gz (4.7 kB view details)

Uploaded Source

Built Distribution

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

Parsenvy-3.0.0-py3-none-any.whl (4.5 kB view details)

Uploaded Python 3

File details

Details for the file Parsenvy-3.0.0.tar.gz.

File metadata

  • Download URL: Parsenvy-3.0.0.tar.gz
  • Upload date:
  • Size: 4.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.1.4 CPython/3.9.1 Linux/5.4.0-1039-azure

File hashes

Hashes for Parsenvy-3.0.0.tar.gz
Algorithm Hash digest
SHA256 21f608025b7181242165854d428e4128bab3667112b6f46a3ead0924aeca02bc
MD5 e632fba3521811c54723dbd81ff0a32e
BLAKE2b-256 d1247bf394df6bdd26f19284acf1cd0fbdc5cf78ae6b63fef1d2f4caa93897f0

See more details on using hashes here.

File details

Details for the file Parsenvy-3.0.0-py3-none-any.whl.

File metadata

  • Download URL: Parsenvy-3.0.0-py3-none-any.whl
  • Upload date:
  • Size: 4.5 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.1.4 CPython/3.9.1 Linux/5.4.0-1039-azure

File hashes

Hashes for Parsenvy-3.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 13bafcf9073d5c559502ba91c0260391c6609b2155c960690c24ab967527e4d6
MD5 081447ffcec9b4ef24759ac057620b0d
BLAKE2b-256 59e6cedb8e706ab1858c145e0906b815a3f0a2b65382a747e3c088e4f0915637

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