Skip to main content

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.9+ 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('DEBUG_ENABLED')  # DEBUG_ENABLED=True
True

>>> parsenvy.int('POSTS_PER_PAGE')  # POSTS_PER_PAGE=13
13

>>> parsenvy.float('EXCHANGE_RATE')  # EXCHANGE_RATE=42.911
42.911

>>> parsenvy.list('INVALID_USERNAMES')  # INVALID_USERNAMES=admin,superuser,user,webmaster
['admin', 'superuser', 'user', 'webmaster']

>>> parsenvy.tuple('SAMPLE_GREETING')  # SAMPLE_GREETING=Hello,world!
('Hello', 'world!')

>>> parsenvy.set('ALLOWED_CATEGORIES')  # ALLOWED_CATEGORIES=python,vim,git
{'python', 'vim', 'git'}

>>> parsenvy.str('DB_PREFIX')  # DB_PREFIX=dj_
'dj_'

Install

pip install parsenvy

Contributing

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

Metadata

Release files for Parsenvy 3.0.3

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for Parsenvy 3.0.3
File Size Uploaded
parsenvy-3.0.3.tar.gz 42.6 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for Parsenvy 3.0.3
File Interpreter ABI Platform
parsenvy-3.0.3-py3-none-any.whl Python 3 none any Details

Total release size: 47.9 kB

Release files / parsenvy-3.0.3.tar.gz

Download URL parsenvy-3.0.3.tar.gz
Size 42.6 kB
Tags Source
SHA-256 checksum
How to use checksums
931c15a8d718f3a0e4cb0e0ca11fad4338c472a6faae69a86ee36ef9e253ce5d
BLAKE2b-256 checksum
How to use checksums
139295a162096d6ac809f17312ef52dd0a6121bc5c3611feb9a9cbb69293be58
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.5.24

Release files / parsenvy-3.0.3-py3-none-any.whl

Download URL parsenvy-3.0.3-py3-none-any.whl
Size 5.3 kB
Tags Python 3
SHA-256 checksum
How to use checksums
9f1160045aece8e2caa26039dc7e3adce534374777fa4741e708a9cc0d5387f2
BLAKE2b-256 checksum
How to use checksums
a83648f625a4e3dc88341a98791a6020d5ddf94451d4d2823b19637cf6d502e5
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.5.24

Release history Release notifications | RSS feed

This release

3.0.3 This release

2 release files

3.0.2

2 release files

3.0.1

2 release files

3.0.0

2 release files

2.1.0

2 release files

2.0.10

2 release files

2.0.9

2 release files

2.0.8

2 release files

2.0.7

2 release files

2.0.5

2 release files

2.0.1

2 release files

2.0.0

2 release files

1.0.2

2 release files

1.0.0

2 release files

0.1.2

2 release files

0.1.1

1 release file

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page