Skip to main content

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


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.3.3.tar.gz (6.5 kB view hashes)

Uploaded Source

Built Distribution

super_map-1.3.3-py3-none-any.whl (7.1 kB view hashes)

Uploaded Python 3

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