Skip to main content

dict-like grouping of environment variables

Project description

# dict-envy

dict-like grouping of environment variables :sparkles:

---

Imagine you have this:

```
COUNTRIES_GB_NAME="United Kingdom"
COUNTRIES_GB_TLD=.uk
COUNTRIES_HK_NAME=China
COUNTRIES_HK_TLD=.cn
```

and with a simple call you can have all of this:

```python
>>> import os
>>> import dictenvy
>>> import pprint
>>> env = dictenvy.dictate(os.environ, depth=2)
>>> pprint.pprint(env)
{'countries': {'gb': {'name': 'United Kingdom', 'tld': '.uk'},
'hk': {'name': 'China', 'tld': '.cn'}}}
```

`depth` is how you regulate the depth of the returned dictionary.

## Installation

Use pip:

```shell
$ pip install dict-envy
```


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

dict-envy-0.1.1.tar.gz (2.1 kB view details)

Uploaded Source

Built Distribution

dict_envy-0.1.1-py3-none-any.whl (2.3 kB view details)

Uploaded Python 3

File details

Details for the file dict-envy-0.1.1.tar.gz.

File metadata

  • Download URL: dict-envy-0.1.1.tar.gz
  • Upload date:
  • Size: 2.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No

File hashes

Hashes for dict-envy-0.1.1.tar.gz
Algorithm Hash digest
SHA256 c560c32a26ce7923ce326f26a5985b216849bf24ef66a9cdb20f1f58de16cd6c
MD5 7dabda602399ccda8a42adf7cd4461f7
BLAKE2b-256 5f7933a4362ee99cfd652da6454d811f7ebc5aded104f52d748c643d14daa0e2

See more details on using hashes here.

File details

Details for the file dict_envy-0.1.1-py3-none-any.whl.

File metadata

File hashes

Hashes for dict_envy-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 264b6909c46e5f63d0db428afd67d941fb5e0cb58209f30d23773ffe26efb909
MD5 55948e5c3f7ccaaee48b3af7dfae1814
BLAKE2b-256 1c12700f3ea3c72ec141c6fb4babebc9a276aaf327f91c176a0a27ad4d0ad8a4

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