A Python Package to enable dot-notation on dictionaries
Project description
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"
Copyright
This project is distributed under the Apache license version 2.0.
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
dot4dict-0.1.1.tar.gz
(6.7 kB
view details)
Built Distribution
File details
Details for the file dot4dict-0.1.1.tar.gz
.
File metadata
- Download URL: dot4dict-0.1.1.tar.gz
- Upload date:
- Size: 6.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.8.0 pkginfo/1.8.2 readme-renderer/32.0 requests/2.27.1 requests-toolbelt/0.9.1 urllib3/1.26.8 tqdm/4.62.3 importlib-metadata/4.11.1 keyring/23.5.0 rfc3986/2.0.0 colorama/0.4.4 CPython/3.9.10
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 3b0f05b0a0e03832db32a191b7bcd52cff45dd53a354b8d75da3f94ed152b712 |
|
MD5 | 79d229971f7179eaf76bb704b959173c |
|
BLAKE2b-256 | 3fe6ed9a4c610ddbfb54f7cee0636931356c362c81d4112f8bb80008933aed6d |
File details
Details for the file dot4dict-0.1.1-py3-none-any.whl
.
File metadata
- Download URL: dot4dict-0.1.1-py3-none-any.whl
- Upload date:
- Size: 7.2 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.8.0 pkginfo/1.8.2 readme-renderer/32.0 requests/2.27.1 requests-toolbelt/0.9.1 urllib3/1.26.8 tqdm/4.62.3 importlib-metadata/4.11.1 keyring/23.5.0 rfc3986/2.0.0 colorama/0.4.4 CPython/3.9.10
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 40fa529924f1694bb797a00b586019a28903e4445fd22e4652c09d12c0b28299 |
|
MD5 | 0972da610c94a01336325e8e175329dd |
|
BLAKE2b-256 | bdfa4b50796bf71cf2fe27948b0adf8006da69ff2771326b44d17aaa6d2641a1 |