Skip to main content

dict dig utils

Some functionality would be quite comfortable to manipulate dicts, and that we do not have to write them all the time. Perhaps they already exist, but for any case, here is a simple version of them for myself.

flattening

First thing is to turn keys into a flattened string, like

  • key1
    • key2
      • key3

turns to key1/key2/key3 Then texts can be easily searched in keys and values withuot transversing the whole structure

display

a simple printing function that indents with the levels of the dict may be intuitive to see what is in a dict.

search for a key

within the whole tree, and return whatever element is found under it in a list, allowing for multiple keys. It searches text in the key, thus using the in operator.

list keys

run through recursively, and give a list of keys from within. This is useful for complex, deep dict trees, when one has no idea where to find a specific key, or how it is spelled.

redisplay depth

after coming back from a deeper dict, display the current depth again

lists

use lists as lists with a serial index along enumerate of the list in dict_disp()

Metadata

Release files for dictDigUtils 1.0.3

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

Source distribution (sdist)

Source distribution for dictDigUtils 1.0.3
File Size Uploaded Provenance
dictDigUtils-1.0.3.tar.gz 3.3 kB Without provenance Details

Built distribution (wheel)

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

Total release size: 6.7 kB

Release files / dictDigUtils-1.0.3.tar.gz

Download URL dictDigUtils-1.0.3.tar.gz
Size 3.3 kB
Tags Source
SHA-256 checksum
How to use checksums
0803098d057a0d5ce32893389c0c903747a1c33cfdc756dfa80648c8bc98939e
BLAKE2b-256 checksum
How to use checksums
58bee2fa823c69d692ebb8ac8ba7da7d61ee673f31309578ad19d2dcc5dee7b8
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.2 CPython/3.10.9

Release files / dictDigUtils-1.0.3-py3-none-any.whl

Download URL dictDigUtils-1.0.3-py3-none-any.whl
Size 3.4 kB
Tags Python 3
SHA-256 checksum
How to use checksums
7ffd42d65fd05f6b7fe29523363a0ca37567256e81dae3f25332d39db6c4e8ea
BLAKE2b-256 checksum
How to use checksums
d1b24e40fb1ce3b82e03e3699e9bb3ec29a5cb7870232f3beec35727f0e38089
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.2 CPython/3.10.9

Security for dictDigUtils 1.0.3

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.

Release history Release notifications | RSS feed

This release

1.0.3 This release

2 release files No provenance

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