Skip to main content

A Python Package to enable dot-notation on dictionaries

Project description

Coverage Status

Dot4Dict

Access dictionary keys with a Dot:

from dot4dict import dotdict

my_dict = dotdict({"foo": "bar"})
assert my_dict.foo == "bar"
assert my_dict["foo"] == "bar"

This works also recursively

from dot4dict import dotdict

my_dict = dotdict({"a": {"b": {"c": "foo"}}})

assert my_dict.a.b.c == "foo"

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

dot4dict-0.1.0.tar.gz (1.7 kB view details)

Uploaded Source

Built Distribution

dot4dict-0.1.0-py3-none-any.whl (1.9 kB view details)

Uploaded Python 3

File details

Details for the file dot4dict-0.1.0.tar.gz.

File metadata

  • Download URL: dot4dict-0.1.0.tar.gz
  • Upload date:
  • Size: 1.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.7.1 importlib_metadata/4.10.1 pkginfo/1.8.2 requests/2.27.1 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.9.10

File hashes

Hashes for dot4dict-0.1.0.tar.gz
Algorithm Hash digest
SHA256 2c269ebc88f5b8de4838f9f237df5c3e075d8bcde8c7869a2234c7ca7bb0fbc3
MD5 35617b6bdeacd1a532c0fa9593b9370a
BLAKE2b-256 f50c7b9c6d7c6cb0731774a16487f9a349824c8849e4ff04a87c03bc4806491e

See more details on using hashes here.

File details

Details for the file dot4dict-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: dot4dict-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 1.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.7.1 importlib_metadata/4.10.1 pkginfo/1.8.2 requests/2.27.1 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.9.10

File hashes

Hashes for dot4dict-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 2fb58ed52f03cef1764caf33ef0a7f3b8ee64dfbd31bfa9b43c0428b9f35f13d
MD5 3e2c8431fa6d180f9061f6b8465ce1b4
BLAKE2b-256 c514e98a9345a24b4e094935d4ce47497b3c006e8bd6f47a8557d880765896f6

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