Skip to main content
Python Software Foundation 20th Year Anniversary Fundraiser  Donate today!

No project description provided

Project description

dottree

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.

Files for dottree, version 0.1.3
Filename, size File type Python version Upload date Hashes
Filename, size dottree-0.1.3-py2.py3-none-any.whl (3.5 kB) File type Wheel Python version py2.py3 Upload date Hashes View
Filename, size dottree-0.1.3.tar.gz (2.8 kB) File type Source Python version None Upload date Hashes View

Supported by

AWS AWS Cloud computing Datadog Datadog Monitoring DigiCert DigiCert EV certificate Facebook / Instagram Facebook / Instagram PSF Sponsor Fastly Fastly CDN Google Google Object Storage and Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Salesforce Salesforce PSF Sponsor Sentry Sentry Error logging StatusPage StatusPage Status page