Skip to main content

Poe[Trie]s

Description

Poetries provides a thread-safe implementation of a Trie. While not limited, but the most common use case of a Trie is in implementing auto-completion. The collection type exposes APIs to perform the following operationsadd, find and get_all_words_with_prefix.

Dependencies

Python 3

Installation

pip install --upgrade poetries

Usage

from poetries.trie import Trie


trie = Trie()
trie.add('foobar')              # Adds 'foobar' to the trie
trie.find('foo')                # Returns False since the word is not present.
trie.add('bar')                 # Adds 'bar' to the trie
trie.find('bar')                # Returns True
trie.add('foob')                # Adds 'foob' to the trie
trie.add('foof')                # Adds 'foof' to the trie
arr = list(trie.prefix('foo'))  # Returns the list of words beginning with foo in a list form, ['foobar', 'foo', 'foob', 'foof']

License

MIT

Changelog

Metadata

Release files for poetries 1.0.0

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

Source distribution (sdist)

Source distribution for poetries 1.0.0
File Size Uploaded Provenance
poetries-1.0.0.tar.gz 2.2 kB Without provenance Details

Built distribution (wheel)

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

Total release size: 5.0 kB

Release files / poetries-1.0.0.tar.gz

Download URL poetries-1.0.0.tar.gz
Size 2.2 kB
Tags Source
SHA-256 checksum
How to use checksums
667924709cc7bb66e0fee6152094cb1988812323b3ca6726a04a963dc1529bf7
BLAKE2b-256 checksum
How to use checksums
c0b9d5f50d57cd1a1b1d89131c9755cbb4955be69cfb2873beb905c6117d8e0b
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.1.1 pkginfo/1.5.0.1 requests/2.22.0 setuptools/40.8.0 requests-toolbelt/0.9.1 tqdm/4.40.0 CPython/3.7.5

Release files / poetries-1.0.0-py3-none-any.whl

Download URL poetries-1.0.0-py3-none-any.whl
Size 2.9 kB
Tags Python 3
SHA-256 checksum
How to use checksums
316dbb5004194fbbd21e03f93a756bcba842bcc30deedd4a911dcc7f5392ab08
BLAKE2b-256 checksum
How to use checksums
e70b3b217ecccb3a21792006a1cabdfa0acbe01849247a3d3459eb8ef7daf236
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.1.1 pkginfo/1.5.0.1 requests/2.22.0 setuptools/40.8.0 requests-toolbelt/0.9.1 tqdm/4.40.0 CPython/3.7.5

Security for poetries 1.0.0

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.

Release history Release notifications | RSS feed

This release

1.0.0 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