Pywalk
Pywalk is a python module written for traversing trees built of dictionaries, lists and tuples in a breadth-first manner.
This module is still under development. If you’re used to mature, polished python libraries you may want to avoid pywalk. Additionally, it has only been tested against Python 2.7.1+ (what happens to be what’s on my computer) so it may not work as expected in Python 3.x. However, if you’re a more adventurous developer with an urge (or need) for manipulating nested data structures, this just might be the library for you!
Pywalk is a spiritual port of js-traverse, in that it’s meant to solve similar problems.
How It Works:
walk(tree) returns a decorator that applies a callback to each node in the tree, in a breadth-first manner. For example:
tree = {'a': 1, 'b': [9, 9, 6, 7, 6]}
print("Tree before: "+repr(tree))
@walk(tree)
def that_aint_my_zip_code(node):
if node.value == [9, 9, 6, 7, 6] :
node.set([9, 9, 7, 7, 5])
print("Tree after: "+repr(tree))
For more, visit https://github.com/jesusabdullah/pywalk .
Metadata
Release files for pywalk 0.0.2
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| pywalk-0.0.2.tar.gz | 3.2 kB | Without provenance | Details for pywalk-0.0.2.tar.gz |
Release files / pywalk-0.0.2.tar.gz
| Download URL | pywalk-0.0.2.tar.gz |
|---|---|
| Size | 3.2 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
1f15e45d83bcb0dcbef452c3621f985aa7ddeacced07a411c34587af392736c1
|
|
BLAKE2b-256 checksum How to use checksums |
94f8d25a4176f3c7ea43ddc6cdc724341016723ccc1d3e89c1894681edbf06fb
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
Security for pywalk 0.0.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.
To learn more about protecting yourself from malicious actors, visit our package security documentation.