MCPcopy
hub / github.com/vladmandic/sdnext / get

Function get

cli/sdapi.py:96–105  ·  view source on GitHub ↗
(endpoint: str, json: dict | None = None)

Source from the content-addressed store, hash-verified

94
95
96async def get(endpoint: str, json: dict | None = None):
97 global sess # pylint: disable=global-statement
98 sess = sess if sess is not None else await session()
99 try:
100 async with sess.get(url=endpoint, json=json, verify_ssl=False) as req:
101 res = await result(req)
102 return res
103 except Exception as err:
104 log.error({ 'session': err })
105 return {}
106
107
108def getsync(endpoint: str, json: dict | None = None):

Callers 4

generateFunction · 0.90
initFunction · 0.90
interruptFunction · 0.70
progressFunction · 0.70

Calls 3

sessionFunction · 0.85
resultFunction · 0.85
getMethod · 0.45

Tested by

no test coverage detected