MCPcopy Create free account
hub / github.com/NVIDIA/OpenShell / _get_json

Function _get_json

deploy/sbom/resolve_licenses.py:220–229  ·  view source on GitHub ↗
(url: str, domain: str)

Source from the content-addressed store, hash-verified

218
219
220def _get_json(url: str, domain: str) -> dict | None:
221 _rate_limit(domain)
222 req = urllib.request.Request(
223 url, headers={"User-Agent": "sbom-license-resolver/1.0"}
224 )
225 try:
226 with urllib.request.urlopen(req, timeout=10) as resp:
227 return json.loads(resp.read())
228 except (urllib.error.HTTPError, urllib.error.URLError, TimeoutError):
229 return None
230
231
232# ---------------------------------------------------------------------------

Callers 3

lookup_cargoFunction · 0.85
lookup_npmFunction · 0.85
lookup_pypiFunction · 0.85

Calls 2

_rate_limitFunction · 0.85
readMethod · 0.45

Tested by

no test coverage detected