craftr.core.util

craftr.core.util.weak

craftr.core.util.pyimport

craftr.core.util.collections

craftr.core.util.typing

unpack_type_hint

unpack_type_hint(hint: t.Any) -> t.Tuple[t.Optional[t.Any], t.List[t.Any]]

Unpacks a type hint into it's origin type and parameters.

craftr.core.util.caching

JsonDirectoryStore Objects

class JsonDirectoryStore(NamespaceStore)

A namespace store that maps one namespace to a JSON file.

JsonFileStore Objects

class JsonFileStore(KeyValueStore)

A very simple key value store backed by a JSON file. Really doesn't do anything fancy. Writes the JSON on every update. Not supported in a threading or multiprocessing context.