Skip to main content

PyDotted

coverage

A very simple low code footprint dictionary with dot notation attribute (x.y) access, including nested dicts.

Installation:

From git:

pip install git+https://github.com/aredden/pydotted.git

From pypi:

pip install pydotted

Examples & Usage:

from pydotted import pydot

d = pydot({"a": 1})

print(d.a)
# prints 1

d.b = d.a + 4

print(d.b)
# prints 5

d.c = {"b": object(), "a": 123}

print(d)
# prints {'a': 1, 'b': 5, 'c': {'b': <object object at 0x...>, 'a': 123}}

print(d.c.a)
# prints 123

d.a = {"e": {"f": {"h": {"i": "j"}}}}

print(d.a.e.f.h.i)
# prints "j"


# Still supports normal dictionary property access
d["j"] = 20

print(d.j)
# prints 20

d.a.e.f.h.i = [{"a": {"b": "c"}}]

# Supports nested lists within dictionaries within lists, (etc...) :)
print(d.a.e.f.h.i[0].a.b)
# prints "c"

# Supports deeply nested lists
d.b = [[[[[{"a":{"b":1}}]]]]]
print(d.b[0][0][0][0][0].a.b)
# prints 1

Updates as of 1/8/22

New Method: todict()

Returns a non-pydot dictionary containing the converted object and nested objects.

Metadata

Release files for pydotted 0.0.8

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

Built distribution (wheel)

Table of built distributions (wheels) for pydotted 0.0.8
File Interpreter ABI Platform Actions
pydotted-0.0.8-py3-none-any.whl Python 3 none any Details for pydotted-0.0.8-py3-none-any.whl

Release files / pydotted-0.0.8-py3-none-any.whl

Download URL pydotted-0.0.8-py3-none-any.whl
Size 3.8 kB
Tags Python 3
SHA-256 checksum
How to use checksums
b85ff6e048d6781b546b0e5b81b8d0f4400f4b4920bfa0fef5e8ab1fbd982867
BLAKE2b-256 checksum
How to use checksums
79bb79a49e6692261b897ca9613054d77bc105de687622bbfa56f0799cd5433c
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.7.1 importlib_metadata/4.8.2 pkginfo/1.8.2 requests/2.23.0 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.8.12

Security for pydotted 0.0.8

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.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

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