Skip to main content

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

tketool_storage-1.4.0.tar.gz (21.1 kB view details)

Uploaded Source

Built Distribution

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

tketool_storage-1.4.0-py3-none-any.whl (29.6 kB view details)

Uploaded Python 3

File details

Details for the file tketool_storage-1.4.0.tar.gz.

File metadata

  • Download URL: tketool_storage-1.4.0.tar.gz
  • Upload date:
  • Size: 21.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/7.0.0 CPython/3.11.4

File hashes

Hashes for tketool_storage-1.4.0.tar.gz
Algorithm Hash digest
SHA256 427cfd269ab5e36c4f7a88c43d0d887fd622b26d57f0b90ea7efa59af035a147
MD5 26a7a8c1eaeb08708378a5d318a722b7
BLAKE2b-256 d00418855233e47308437640e907be90fcf40accbc8a2ca4504ec4e7a46bfaec

See more details on using hashes here.

File details

Details for the file tketool_storage-1.4.0-py3-none-any.whl.

File metadata

File hashes

Hashes for tketool_storage-1.4.0-py3-none-any.whl
Algorithm Hash digest
SHA256 56de5a038e0ecff3256d198efe167ee5bcbd80f2918f9fcdb1834919e2021495
MD5 15c53816e2042276c1c15d50ceca27e1
BLAKE2b-256 426a45fed767b936e415d7c58503e6b6fc750033c0dc3f6cb1a3c2df252ab74f

See more details on using hashes here.

Release history Release notifications | RSS feed

2.0.1

2 files

1.4.3

2 files

This release

1.4.0 This release

2 files

1.3.5

2 files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page