CMD + K

easydict

Community

Access dict values as attributes (works recursively).

Installation

To install this package, run one of the following:

Conda
$conda install conda-forge::easydict

Usage Tracking

1.13
1.9
2 / 8 versions selected
Downloads (Last 6 months): 0

Description

EasyDict allows to access dict values as attributes (works recursively). A Javascript-like properties dot notation for python dicts.

=====

USAGE

::

>>> from easydict import EasyDict as edict
>>> d = edict({'foo':3, 'bar':{'x':1, 'y':2}})
>>> d.foo
3
>>> d.bar.x
1

>>> d = edict(foo=3)
>>> d.foo
3

About

Summary

Access dict values as attributes (works recursively).

Last Updated

Nov 10, 2024 at 00:40

License

LGPL-3.0-only

Total Downloads

409.0K

Supported Platforms

noarch