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 hashes)