MCPcopy
hub / github.com/encode/uvicorn / get_client_addr

Function get_client_addr

uvicorn/protocols/utils.py:51–55  ·  view source on GitHub ↗
(scope: WWWScope)

Source from the content-addressed store, hash-verified

49
50
51def get_client_addr(scope: WWWScope) -> str:
52 client = scope.get("client")
53 if not client:
54 return ""
55 return "%s:%d" % client
56
57
58def get_path_with_query_string(scope: WWWScope) -> str:

Callers 6

sendMethod · 0.90
sendMethod · 0.90
sendMethod · 0.90
sendMethod · 0.90
asgi_sendMethod · 0.90
test_get_client_addrFunction · 0.90

Calls

no outgoing calls

Tested by 1

test_get_client_addrFunction · 0.72