Skip to main content

affix-tree

A trie-like data structure that allows storing and searching data based on the longest matching prefix or suffix of a given string.

Installation

pip install affix-tree

Usage

As a prefix tree

>>> from affix_tree import AffixTree

>>> prefix_tree: AffixTree[int] = AffixTree()
>>> prefix_tree.add('prefix', 1)
>>> prefix_tree.add('prefix-2', 2)

>>> prefix_tree.find('prefix-2-test')

2

As a suffix tree

>>> from affix_tree import AffixTree

>>> prefix_tree: AffixTree[int] = AffixTree(is_suffix_tree=True)
>>> prefix_tree.add('suffix', 1)
>>> prefix_tree.add('2-suffix', 2)

>>> prefix_tree.find('test-2-suffix')

2

Metadata

Release files for affix-tree 0.1.1

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

Source distribution (sdist)

Source distribution for affix-tree 0.1.1
File Size Uploaded Provenance Actions
affix_tree-0.1.1.tar.gz 1.8 kB Without provenance Details for affix_tree-0.1.1.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for affix-tree 0.1.1
File Interpreter ABI Platform Actions
affix_tree-0.1.1-py3-none-any.whl Python 3 none any Details for affix_tree-0.1.1-py3-none-any.whl

Total release size: 4.1 kB

Release files / affix_tree-0.1.1.tar.gz

Download URL affix_tree-0.1.1.tar.gz
Size 1.8 kB
Tags Source
SHA-256 checksum
How to use checksums
cb547ba6983bf9ca2e4c0c78ade30ea6ff8bdad66dacbe4d3b9610731c74bcf1
BLAKE2b-256 checksum
How to use checksums
8cdccfb1bbaca4bed1221afd1bd80c645f944248b502d2b13cc61e362f0a98bf
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/2.0.0 CPython/3.13.0 Darwin/24.3.0

Release files / affix_tree-0.1.1-py3-none-any.whl

Download URL affix_tree-0.1.1-py3-none-any.whl
Size 2.3 kB
Tags Python 3
SHA-256 checksum
How to use checksums
4f076d0a0d2739c406e9eff41cec7042359cc1201b17dea6d10461c9c5ffd218
BLAKE2b-256 checksum
How to use checksums
6ac6c566de2487c5b2c4ec2649f956e0a26e044d8ad45f5abe3322ec186d058a
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/2.0.0 CPython/3.13.0 Darwin/24.3.0

Security for affix-tree 0.1.1

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

0.1.1 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