Datamonger

datamonger.cache_info

Datamonger for Python · python · 0.4.0

cache_info(*, cache_dir: Pathish | None = None) -> datamonger.CacheInfo

Report cached registries and artifacts without accessing the network.

Examples

Inspect an empty private cache without changing the user’s cache:

>>> from tempfile import TemporaryDirectory
>>> from datamonger import cache_info
>>> with TemporaryDirectory() as directory:
...     info = cache_info(cache_dir=directory)
...     print(info.total_size, len(info.entries))
0 0

Same API in