xdol#
Extended Data Object Layers - dol-based tools
To install: pip install xdol
Persistent memoizer (record/replay)#
Wrap a costly function (a paid API, a slow render) so the first run records its result to disk and every later run replays it:
from xdol import memoize_calls
@memoize_calls(store="tests/cassettes", mode="record") # default mode is replay-only: a miss raises
def slow_square(x):
return {"result": x * x}
Stable keys (xdol.keys), text / JSON / binary / paired .json+.bin codecs, any MutableMapping as the store (a folder, S3), spend-safe replay by default. See misc/docs/persistent_memoizer.md.
This documentation as a single file: xdol.md (Markdown, for agents).
built 2026-10-14 01:07 UTC from 02cbc8c (master) · xdol 0.1.17 · about this build