Skip to main content

SearchableTree

Simple list intended for simplifying traversal & node search Does not support deletion

Example:

tree = SearchableTree("root", SearchableNode)
root = tree.root()
l1 = root.appendChild('l1')
l11 = root.appendChild('l11')
l12 = root.appendChild('l12')
l2 = root.appendChild('l2')
l21 = root.appendChild('l21')
l22 = root.appendChild('l22')
root.upsert("l1.l11.l111")
root.upsert("l1.l11.l112")

for el in root.traverse(): #Traverse all nodes
	print(el)

print(tree) #Pretty print tree
print(tree.find("l112")) #Get node by name
print(tree.find("root.l1.l11")) #Get node by path
for el in l2.ancestors(): #Get node ancestors
print(el)

Extend SearchableNode to add custom funcionality

Author

Metadata

Release files for SearchableTree 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 SearchableTree 1.0.3
File Size Uploaded Provenance Actions
SearchableTree-1.0.3.tar.gz 3.0 kB Without provenance Details for SearchableTree-1.0.3.tar.gz

Built distribution (wheel)

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

Total release size: 6.6 kB

Release files / SearchableTree-1.0.3.tar.gz

Download URL SearchableTree-1.0.3.tar.gz
Size 3.0 kB
Tags Source
SHA-256 checksum
How to use checksums
9d9394bf275cf752cd35c998fd3240c4b3233eccb6bbdb586040329aacf795da
BLAKE2b-256 checksum
How to use checksums
672831b95f3b27468692c8905f190394273ce83ac28b1053102283af401aaace
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.2 CPython/3.7.4

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

Download URL SearchableTree-1.0.3-py3-none-any.whl
Size 3.6 kB
Tags Python 3
SHA-256 checksum
How to use checksums
e2dd421da8f1d09e28d1ca5975857ed9148feb4d343b2e5ccc53d25498be652f
BLAKE2b-256 checksum
How to use checksums
a9bbf2affcaca7a920648ebaabfb286dd2e130654ce9dc5af676ffe29f5ebdf0
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.2 CPython/3.7.4

Security for SearchableTree 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.

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