Skip to content
i2mintPublic

About

Extended Data Object Layers - dol-based tools

Resources

Stars

0 stars

Watchers

3 watching

Forks

Latest commit

 

History

98 Commits

Folders and files

Repository files navigation

xdol

Extended Data Object Layers - dol-based tools

To install: pip install xdol

Documentation

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.

About

Extended Data Object Layers - dol-based tools

Resources

Stars

0 stars

Watchers

3 watching

Forks

Releases

Packages

Used by

Contributors

Languages