Dot notation python dicationary
Project description
pydotmap
This package is just a wrapper to python standard library dict
. It will allow you to use python dict or dictionary as dot notation just like javascript object.
How to use?
from pydotmap import DotMap
from pydotmap import OrderedDotMap
author = DotMap(name="atul", sirname="singh", addr=[{"country": "India"}])
print(author.name)
print(author.sirname)
del author.sirname
print(author.sirname)
print(author.get("sirname", "singh")) # you can use your default value same as dict
print(author.addr[0].country)
# Ordered Map - This will maintain the order of your dictionary
author = OrderedDotMap(name="atul", sirname="singh", addr=[{"country": "India"}])
print(author)
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 Distribution
pydotmap-0.0.6.tar.gz
(2.3 kB
view details)
Built Distribution
File details
Details for the file pydotmap-0.0.6.tar.gz
.
File metadata
- Download URL: pydotmap-0.0.6.tar.gz
- Upload date:
- Size: 2.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.3.0 pkginfo/1.6.1 requests/2.23.0 setuptools/51.1.0 requests-toolbelt/0.9.1 tqdm/4.46.0 CPython/3.8.3
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 5e5b03180caacd8d9f7fa326e0925651592da1ceab5bcfbaced8556f256a1a4e |
|
MD5 | f0ee0bc7fe9f832a619f4ed15cfcddb4 |
|
BLAKE2b-256 | baf3cbb99cfb9a4f1802dac22ba31a732b6b7dbf0d5375e923f9005e0d4912aa |
File details
Details for the file pydotmap-0.0.6-py3-none-any.whl
.
File metadata
- Download URL: pydotmap-0.0.6-py3-none-any.whl
- Upload date:
- Size: 3.4 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.3.0 pkginfo/1.6.1 requests/2.23.0 setuptools/51.1.0 requests-toolbelt/0.9.1 tqdm/4.46.0 CPython/3.8.3
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 1d162b9b23faa63ad466f6f2cf93cb8dbccd0b435d8928a626bbafb4946d1605 |
|
MD5 | f74c1dd300d56e57cd0f1f3864952a43 |
|
BLAKE2b-256 | ef60ff52b134fa076a7e1b46e92e4543b177f2e5829b47336bd493521ca720b7 |