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.5.tar.gz
(2.2 kB
view details)
Built Distribution
File details
Details for the file pydotmap-0.0.5.tar.gz
.
File metadata
- Download URL: pydotmap-0.0.5.tar.gz
- Upload date:
- Size: 2.2 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 | d165d1eb72852c6a1bd1c43eb6ee5fb685370f3a2a472e7e9c8e0f89c72352d3 |
|
MD5 | 4c05c1548bb94de0cc638805b9768c1d |
|
BLAKE2b-256 | 1b1e3bac988b0543cf487157001cd219e6014f515cfb463a7a2fc8e5ca095667 |
File details
Details for the file pydotmap-0.0.5-py3-none-any.whl
.
File metadata
- Download URL: pydotmap-0.0.5-py3-none-any.whl
- Upload date:
- Size: 3.2 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 | 0cb5f760b02199850a2182be412b2bbe7b12dfc778096c7919ea71eda7d24af5 |
|
MD5 | e5e7e96348206bf7b9395f2ff87eaba4 |
|
BLAKE2b-256 | 730708d43d63b29b8287b280aa7c66dae98376241b858cde4ea9a7c15e5178a0 |