About Anaconda Help Download Anaconda

Access dict values as attributes (works recursively).

Installers

Info: This package contains files in non-standard labels.
  • noarch v1.9

conda install

To install this package run one of the following:
conda install conda-forge::easydict
conda install conda-forge/label/cf201901::easydict
conda install conda-forge/label/cf202003::easydict

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

© 2024 Anaconda, Inc. All Rights Reserved. (v4.0.4) Legal | Privacy Policy