MCPcopy Create free account
hub / github.com/SourceCode-AI/aura / get_json

Method get_json

aura/mirror.py:32–43  ·  view source on GitHub ↗
(self, package_name)

Source from the content-addressed store, hash-verified

30 yield from (cls.get_mirror_path() / "json").iterdir()
31
32 def get_json(self, package_name) -> dict:
33 assert package_name
34 json_path = self.get_mirror_path() / "json" / package_name
35 target = cache.MirrorJSON.proxy(src=json_path)
36
37 if not target.is_file():
38 json_path = self.get_mirror_path() / "json" / canonicalize_name(package_name)
39 target = cache.MirrorJSON.proxy(src=json_path)
40 if not target.exists():
41 raise NoSuchPackage(package_name)
42
43 return json.loads(target.read_text())
44
45 def url2local(self, url: typing.Union[ParseResult, str]) -> Path:
46 if not isinstance(url, ParseResult):

Callers 3

test_local_mirrorFunction · 0.95
things_to_runFunction · 0.80
from_cachedMethod · 0.80

Calls 4

get_mirror_pathMethod · 0.95
NoSuchPackageClass · 0.85
proxyMethod · 0.45
existsMethod · 0.45

Tested by 1

test_local_mirrorFunction · 0.76