Metadata-Version: 2.1
Name: typed-trie
Version: 0.1.0
Summary: A pure Python implementation of a trie with typing.
Home-page: https://github.com/henadzit/typed-trie
License: MIT
Keywords: trie
Author: henadzit
Author-email: henadzi.tsaryk@gmail.com
Requires-Python: >=3.11,<4.0
Classifier: License :: OSI Approved :: MIT License
Classifier: Programming Language :: Python
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Project-URL: Repository, https://github.com/henadzit/typed-trie
Description-Content-Type: text/markdown

# typed-trie

A pure Python implementation of [trie](https://en.wikipedia.org/wiki/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](https://spdx.org/licenses/MIT.html) license.
