Python Dictionary to Dot notation (class) package
Project description
python-dict2dot
Python Dictionary to Dot notation published in GitHub and PyPi.
This implementation admits dot notation to access nested dictionaries, once the parent is dict.
To pip install, run:
$ pip install dict2dot
The main class
With the python console and the dict2doc package, we can get things running:
$ python
>>>
from dict2dot import Dict2Dot
my_d2dot = Dict2Dot({'dogs': {'breeds': ['Golden']}, 'birds': {'breeds': ['Cockatiel']}})
my_d2dot.dogs.breeds.append('Lhasa Apso')
print( my_d2dot.dogs )
my_dict = my_d2dot.dict()
print( my_dict )
other_dot2dict = Dict2Dot()
other_dot2dict.a_new_key = 'a new value'
print( other_dot2dict.a_new_key )
Documentation
Please try from python console:
$ python
>>> from dict2dot import Dict2Dot
>>> help(Dict2Dot)
Or try from command line:
$ python -c "import dict2dot; print(dict2dot.__doc__)"
All documentation can be found in docs.
To do
- Remove elements from class.
- Improve documentation.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distributions
No source distribution files available for this release.See tutorial on generating distribution archives.
Built Distribution
File details
Details for the file dict2dot-0.1-py3-none-any.whl
.
File metadata
- Download URL: dict2dot-0.1-py3-none-any.whl
- Upload date:
- Size: 3.3 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.2.0 pkginfo/1.5.0.1 requests/2.24.0 setuptools/49.3.1 requests-toolbelt/0.9.1 tqdm/4.48.2 CPython/3.8.2
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | ff76ed461266e1c848c952d72b852b891e24164ee9ed5c9e537d8aa9e0699087 |
|
MD5 | 8cc7679f97043abb37de2a89e515f3b4 |
|
BLAKE2b-256 | 5fed9cc7fe181c4b2eea8b2366b15e49a2eb928909da0ef211a15a19b425f1fe |