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}
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
dottree-0.1.3.tar.gz
(2.8 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 dottree-0.1.3.tar.gz.
File metadata
- Download URL: dottree-0.1.3.tar.gz
- Upload date:
- Size: 2.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.0.3 CPython/2.7.13 Windows/10
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
c1b1d5cc9db0dec99c7ec32fb2be5eb3c4367abf53f9ac0e462d336a2eb90b71
|
|
| MD5 |
5e33aff00a6e160493eaa7dd18831ef5
|
|
| BLAKE2b-256 |
965609d6cd4f5d1e0bdaa92a2394ffa0b6427f1c5ebca2f2743f3adeffc387c1
|
File details
Details for the file dottree-0.1.3-py2.py3-none-any.whl.
File metadata
- Download URL: dottree-0.1.3-py2.py3-none-any.whl
- Upload date:
- Size: 3.5 kB
- Tags: Python 2, Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.0.3 CPython/2.7.13 Windows/10
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
c03e6607287ecbdc78f34ec845ac410c8f2a287168ce2acb7e635e8c69b45d38
|
|
| MD5 |
11186c28eafb29ece6437eebc0e0ff58
|
|
| BLAKE2b-256 |
6238d42ba28dc6c94ac0f4b07fe091e2b9aa467b60127ca2eee76178ed7e578c
|