Skip to content

Latest commit

 

History

History
28 lines (19 loc) · 728 Bytes

README.md

File metadata and controls

28 lines (19 loc) · 728 Bytes

Coverage Status PyPI version

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.