MCPcopy
hub / github.com/omkarcloud/botasaurus / get_items

Method get_items

botasaurus/cache.py:320–330  ·  view source on GitHub ↗
(func, items=None, max=None)

Source from the content-addressed store, hash-verified

318
319 @staticmethod
320 def get_items(func, items=None, max=None):
321 # resolve user errors
322 if isinstance(items, str):
323 return Cache.get_items(func, items)
324
325 hashes = Cache.get_items_hashes(func, items)
326 if max is not None:
327 hashes = hashes[:max]
328 fn_name = getfnname(func)
329 paths = [relative_path(f'{Cache.cache_directory}{fn_name}/{r}.json') for r in hashes]
330 return _read_json_files(paths)
331
332 @staticmethod
333 def delete_corrupted_items(func):

Callers 1

getMethod · 0.80

Calls 4

getfnnameFunction · 0.85
get_items_hashesMethod · 0.80
relative_pathFunction · 0.70
_read_json_filesFunction · 0.70

Tested by

no test coverage detected