Parsenvy is an enviously elegant environment variable parsing Python library.
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
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)
| File | Size | Uploaded | |
|---|---|---|---|
| parsenvy-3.0.3.tar.gz | 42.6 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| 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
|