tketool.storage
Extensible graphs, trees, maps, lists, and linked lists over replaceable ordered storage backends.
pip install tketool.storage
from tketool.storage import Graph, MemoryBackend, PersistentMap, Tree
backend = MemoryBackend()
settings = PersistentMap(backend, "settings")
settings.put("language", "zh-CN")
graph = Graph(backend, "knowledge")
person = graph.add_node("alice", {"name": "Alice"}, type="person")
Optional adapters:
pip install "tketool.storage[sql]"
pip install "tketool.storage[postgresql]"
pip install "tketool.storage[redis]"
The dependency-free adapters are MemoryBackend and SQLiteBackend.
SQLAlchemyBackend uses SQLAlchemy Core and database-specific drivers;
RedisBackend uses redis-py and an atomic Lua batch.
The old tketool.ml/tketool.ml2 and domain-specific StorageBase APIs are
not retained. New backends only
implement point read, ordered scan, atomic batch, and transaction primitives;
new data structures compose those primitives without changing adapters.
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 tketool_storage-1.3.5.tar.gz.
File metadata
- Download URL: tketool_storage-1.3.5.tar.gz
- Upload date:
- Size: 21.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via:
twine/7.0.0 CPython/3.11.4
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
ba4d8ab4caaca78927ad0c5e97a104b0abcfd73094cb76109e82e7015c839d1e
|
|
| MD5 |
2f93b72467a4dcb79726bd16ada142d8
|
|
| BLAKE2b-256 |
d0c63cebbd71e7b111d2d72ceb53505f7e31d7b917c9eee48ce7bed02791d7a3
|
File details
Details for the file tketool_storage-1.3.5-py3-none-any.whl.
File metadata
- Download URL: tketool_storage-1.3.5-py3-none-any.whl
- Upload date:
- Size: 29.6 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via:
twine/7.0.0 CPython/3.11.4
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
fafbdb602faa8e0bb65bab73e595bf26cbe34b6e57be80523b159c05ea9793fd
|
|
| MD5 |
99d276aacf34e44d67dfea3f9da86623
|
|
| BLAKE2b-256 |
69ee906451bc6dc31072e3ae16cc3e1c33c69ecc8d200ae406115e331074c181
|