Skip to main content

No project description provided

Project description


An "Enhanced defaultdict", I have been using this construct in my code many time ends up writing the biolerplate getter setter many times. So packed into a module to share with you all.

How to install

  • Use pip to install
  • tested in Python2
pip install dottree 

Quick check

How to use:
- use like a dict
- use like an object 
- Go as deep you need


from dottree import dotree as dot

d = dot()
d.M.J = 7
assert  d.M.J  == 7
assert  d['M']['J']  == 7

# downgrade to a dict any time
print dict(d.M) # {'J': 7}

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

dottree-0.1.3.tar.gz (2.8 kB view hashes)

Uploaded source

Built Distribution

dottree-0.1.3-py2.py3-none-any.whl (3.5 kB view hashes)

Uploaded py2 py3

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