Skip to main content

A pure Python implementation of a trie with typing.

Project description

typed-trie

A pure Python implementation of trie with typing.

Usage

>>> from typed_trie import Trie
>>>
>>> trie = Trie()
>>> trie["how to cook"] = 1
>>> trie["how to swim"] = 2
>>> trie["who is john doe"] = 3
>>> list(trie.items_by_prefix("how to"))
[('how to cook', 1), ('how to swim', 2)]
>>> del trie["how to cook"]

License

typed-trie is distributed under the terms of the MIT license.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

typed_trie-0.1.0.tar.gz (2.6 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

typed_trie-0.1.0-py3-none-any.whl (3.2 kB view details)

Uploaded Python 3

File details

Details for the file typed_trie-0.1.0.tar.gz.

File metadata

  • Download URL: typed_trie-0.1.0.tar.gz
  • Upload date:
  • Size: 2.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.7.1 CPython/3.11.7 Darwin/22.4.0

File hashes

Hashes for typed_trie-0.1.0.tar.gz
Algorithm Hash digest
SHA256 0495c6517a84487ebab5ce0ebb20b2b3d8b9b610a4d1e2361be08457a30ec46b
MD5 5b96e96e0ceb4aedcb84d81866ed2d30
BLAKE2b-256 54f902a62c5035f71c391d1c0b9fd149fd9acb74de98f95ea55744a6fd7823bd

See more details on using hashes here.

File details

Details for the file typed_trie-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: typed_trie-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 3.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.7.1 CPython/3.11.7 Darwin/22.4.0

File hashes

Hashes for typed_trie-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 3de47090e880539b5e0afa25e3cbb7606e001023d79b4ea017d4c82f9f7e600c
MD5 aa81beb4cf772777a4903f031b173f7d
BLAKE2b-256 3c1528795dec19951f49eb5c21a76099849b5022e2013d75f8cac1216e0e449f

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page