Skip to main content

Dot notation python dicationary

Project description

pydotmap

built with Python3

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)


# Oderdered Map - This will maintain the order of your dictionary

author = OrderedDotMap(name="atul", sirname="singh", addr=[{"country": "India"}])
print(author)

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

pydotmap-0.0.4.tar.gz (2.2 kB view details)

Uploaded Source

Built Distribution

pydotmap-0.0.4-py3-none-any.whl (3.2 kB view details)

Uploaded Python 3

File details

Details for the file pydotmap-0.0.4.tar.gz.

File metadata

  • Download URL: pydotmap-0.0.4.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

Hashes for pydotmap-0.0.4.tar.gz
Algorithm Hash digest
SHA256 77b4cf4d564a5ff110812faa0ff76658e1412cd7e85f0b52950cd86591c1b99a
MD5 926c392a1ef7335bad8a52070e01a06f
BLAKE2b-256 8e279e60f631409679cffa92b45c3edbdcee7f42a52b79d6b5933a124541b98c

See more details on using hashes here.

File details

Details for the file pydotmap-0.0.4-py3-none-any.whl.

File metadata

  • Download URL: pydotmap-0.0.4-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

Hashes for pydotmap-0.0.4-py3-none-any.whl
Algorithm Hash digest
SHA256 9acebea3ce4b1fbfcaf48d0b858f7e2d432a37aaf85bfb4526c8c9ae9572453c
MD5 604bbc4343a4c942a99b50330afe1095
BLAKE2b-256 994ad0970687579086cb36d6238f98456bd6ffa7a4e08e67a452bd7e892ab8c8

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page