Skip to main content

An easy to use and easy to read dict

Project description

AttribDict

Introduction

AttribDict is an easy to use and easy to read dict, it is more flexible and human readable.

Examples

>>> from attribdict import AttribDict as Dict
>>> _d = {"attr"+str(i): i for i in range(4)}
>>> d = Dict(_d)
>>> d.attr4.subattr1.subsubattr1 = 123
>>> d.attr5 = {"subattr"+str(i): i for i in range(3)}
>>> print(d)
attr0: 0
attr1: 1
attr2: 2
attr3: 3
attr4:
    - subattr1:
        - subsubattr1: 123
attr5:
    - subattr0: 0
    - subattr1: 1
    - subattr2: 2

Installation

pip install attribdict

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

attribdict-0.0.2.tar.gz (2.5 kB view hashes)

Uploaded Source

Built Distribution

attribdict-0.0.2-py3-none-any.whl (3.6 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