Python client for the triedis trie server
Project description
triedis-py
Python client for triedis, an in-memory trie server.
Bundles the triedis Linux binary — no separate server install needed.
Installation
uv add triedis-py
Usage
Sync
from triedis_py import TriedisClient
with TriedisClient() as client: # auto-starts bundled server
trie = client.trie("words")
trie.insert("cat")
trie.insert("category")
print(trie.contains("cat")) # True
print(trie.prefix_search("cat")) # ["cat", "category"]
Async
from triedis_py import AsyncTriedisClient
async with AsyncTriedisClient() as client:
trie = client.trie("words")
await trie.insert("cat")
print(await trie.prefix_search("ca")) # ["cat"]
Connect to existing server
with TriedisClient(auto_start=False, host="localhost", port=4657) as client:
...
Commands
| Trie method | Server command | Returns |
|---|---|---|
insert(word) |
SET <trie> <word> |
None |
contains(word) |
GET <trie> <word> |
bool |
prefix_search(prefix) |
TPREFIX <trie> <prefix> |
list[str] |
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file triedis_py-0.1.0.tar.gz.
File metadata
- Download URL: triedis_py-0.1.0.tar.gz
- Upload date:
- Size: 2.1 MB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
a6155b0d4c49f8338a16ad3cf07468d5dff0b698ee77ce484763901e5f14ed57
|
|
| MD5 |
4f6c1a12a07613c00db59519cea0580d
|
|
| BLAKE2b-256 |
ef13e11effa8765e13a67bec485f9a221c89ec593fe1951f0fe505061ad59eb1
|
Provenance
The following attestation bundles were made for triedis_py-0.1.0.tar.gz:
Publisher:
publish.yml on joalon/triedis-py
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
triedis_py-0.1.0.tar.gz -
Subject digest:
a6155b0d4c49f8338a16ad3cf07468d5dff0b698ee77ce484763901e5f14ed57 - Sigstore transparency entry: 1203599382
- Sigstore integration time:
-
Permalink:
joalon/triedis-py@46706f414536c16db78074c5f9e2a3e66903786c -
Branch / Tag:
refs/tags/v0.1.0 - Owner: https://github.com/joalon
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@46706f414536c16db78074c5f9e2a3e66903786c -
Trigger Event:
push
-
Statement type:
File details
Details for the file triedis_py-0.1.0-py3-none-manylinux_2_17_x86_64.whl.
File metadata
- Download URL: triedis_py-0.1.0-py3-none-manylinux_2_17_x86_64.whl
- Upload date:
- Size: 2.1 MB
- Tags: Python 3, manylinux: glibc 2.17+ x86-64
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
0d0df80bb54541ed6dbcd2a0ff61275f4b6960e379e4cec8e63af4b4d383f56e
|
|
| MD5 |
5ca0cc02b97f1099c8a95bdcfd5d33f0
|
|
| BLAKE2b-256 |
b0e93041aa6a886f7c1d29aef7d8894d87277c1c3f9242c5efb6618d869d2f09
|
Provenance
The following attestation bundles were made for triedis_py-0.1.0-py3-none-manylinux_2_17_x86_64.whl:
Publisher:
publish.yml on joalon/triedis-py
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
triedis_py-0.1.0-py3-none-manylinux_2_17_x86_64.whl -
Subject digest:
0d0df80bb54541ed6dbcd2a0ff61275f4b6960e379e4cec8e63af4b4d383f56e - Sigstore transparency entry: 1203599384
- Sigstore integration time:
-
Permalink:
joalon/triedis-py@46706f414536c16db78074c5f9e2a3e66903786c -
Branch / Tag:
refs/tags/v0.1.0 - Owner: https://github.com/joalon
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@46706f414536c16db78074c5f9e2a3e66903786c -
Trigger Event:
push
-
Statement type: