_dot_dict
Dotted dictionary for consistent interface.
Consider moving to Corallium, but I don’t have any uses for it yet.
Attributes⚓︎
Functions⚓︎
ddict ⚓︎
ddict(**kwargs)
Return a dotted dictionary that can also be accessed normally.
- Currently uses
python-box
- Could consider
cleverdict
which had updates as recently as 2022 - There are numerous other variations that haven’t been updated since 2020, such as
munch
,bunch
,ddict
PARAMETER | DESCRIPTION |
---|---|
**kwargs |
keyword arguments formatted into dictionary
TYPE:
|
RETURNS | DESCRIPTION |
---|---|
DdictType
|
dotted dictionary
TYPE:
|
Source code in calcipy/dot_dict/_dot_dict.py
@beartype
def ddict(**kwargs: Dict[str, Any]) -> DdictType:
"""Return a dotted dictionary that can also be accessed normally.
- Currently uses `python-box`
- Could consider `cleverdict` which had updates as recently as 2022
- There are numerous other variations that haven't been updated since 2020, such as `munch`, `bunch`, `ddict`
Args:
**kwargs: keyword arguments formatted into dictionary
Returns:
DdictType: dotted dictionary
"""
return Box(kwargs)