Skip to main content

EasyDict

Access dict values as attributes (works recursively)

<https://github.com/makinacorpus/easydict>

USAGE

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

Very useful when exploiting parsed JSON content !

>>> from easydict import EasyDict
>>> from simplejson import loads
>>> j = """{
"Buffer": 12,
"List1": [
    {"type" : "point", "coordinates" : [100.1,54.9] },
    {"type" : "point", "coordinates" : [109.4,65.1] },
    {"type" : "point", "coordinates" : [115.2,80.2] },
    {"type" : "point", "coordinates" : [150.9,97.8] }
]
}"""
>>> d = EasyDict(loads(j))
>>> d.Buffer
12
>>> d.List1[0].coordinates[1]
54.9

LICENSE

  • Lesser GNU Public License

CHANGELOG

1.2

  • Renamed README.rst to README.txt

1.1

  • Fix #1: README.rst was missing for setup install

1.0

  • Initial version. Does what I need.

AUTHORS

Metadata

Release files for easydict 1.2

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for easydict 1.2
File Size Uploaded Provenance
easydict-1.2.tar.gz 2.0 kB Without provenance Details

Release files / easydict-1.2.tar.gz

Download URL easydict-1.2.tar.gz
Size 2.0 kB
Tags Source
SHA-256 checksum
How to use checksums
b52bcf7cbf2cad5768f72b2001c0e8e3f4ff679f20f86e3d9687ec5599349476
BLAKE2b-256 checksum
How to use checksums
1677deb8572f902036f3e3043d69d7f08b8af7d359776ba45d1a039149678953
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No

Security for easydict 1.2

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page