Like dict, but easier
Project description
What is this?
A python package that provides an alternative to dict that is much easier for lazy people to use.
How do I use this?
pip install super_map
from super_map import Map, LazyDict
item = Map()
# no error
item["value"]["subvalue"] = True
# prints true
print(item.value.subvalue == item["value"]["subvalue"]) # prints true
# dont need .items()
for each_key, each_value in item:
print(each_key)
for each_key in item[Map.Keys]:
print(each_key)
for each_key in item[Map.Values]:
print(each_key)
value = item.a.b.c.d.e
if not value:
# this prints out
print("item.a.b.c.d.e doesn't exist")
item_as_dict = item[Map.Dict]
item.f.g.h += 1
print('will print out 1:', item.f.g.h)
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
super_map-1.2.3.tar.gz
(4.1 kB
view details)
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file super_map-1.2.3.tar.gz.
File metadata
- Download URL: super_map-1.2.3.tar.gz
- Upload date:
- Size: 4.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.4.1 importlib_metadata/4.8.1 pkginfo/1.7.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.8.6
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
5911fd895a53603bf94f8d86eda0303af6723b2be766f53eb321712766a661e3
|
|
| MD5 |
218133cc409cfbc85a0c3bfcc94f09f3
|
|
| BLAKE2b-256 |
6f2d2922287f0ec1b59ed191a51d17d883521da6bcc3f9be2b2ed800751c9da3
|
File details
Details for the file super_map-1.2.3-py3-none-any.whl.
File metadata
- Download URL: super_map-1.2.3-py3-none-any.whl
- Upload date:
- Size: 6.3 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.4.1 importlib_metadata/4.8.1 pkginfo/1.7.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.8.6
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
377aee5ae782ab208bd8b37e6863ccbc60dfb1d3d7d1d4281c01076fce79da30
|
|
| MD5 |
29a30dad4bea4889a3ba99382050ab33
|
|
| BLAKE2b-256 |
315ccd4927a63758d4779ab69eb0297c91d307d80b542576e1a10c58daca44e6
|