===========
A simple trie implementation in Python
This implementation utilizes a dictionary as its backing
data structure. Essentially, it is creating nested dictionaries.
Example
----------
>>> from trie import TriePy
>>> t = TriePy()
>>> t.add_word("dog")
>>> t.add_word("doggy")
>>> t.add_word("dogs")
>>> t.contains_word("dog")
True
>>> t.contains_word("dogg")
False
>>> t.root
{'d': {'o': {'g': {'\0': {'word': 'dog'}, 's': {'\0': {'word': 'dogs'}}, 'g': {'y': {'\0': {'word': 'doggy'}}}}}}}
Unit Testing
----------
nose is used for unit testing and simple unit tests
can be run with the following in the source trie directory:
`nosetests`
Installation
----------
You can install this as usual with `setup.py`.
`python setup.py install`
You can also install this via pip.
`pip install TriePy`
The usual "use virtualenv to test first" warnings apply.
Metadata
Release files for TriePy 0.2.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| TriePy-0.2.1.tar.gz | 2.8 kB | Without provenance | Details for TriePy-0.2.1.tar.gz |
Release files / TriePy-0.2.1.tar.gz
| Download URL | TriePy-0.2.1.tar.gz |
|---|---|
| Size | 2.8 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
50bd20249a96367f7fbce62d84d2af439c9581c884925a8441d380a55c7960c1
|
|
BLAKE2b-256 checksum How to use checksums |
f89e98b8d0d70b561611f35142bee009185a1bcba7999cba06c1f66974b49880
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
Security for TriePy 0.2.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.