MCPcopy Create free account
hub / github.com/encode/starlette / FileApp

Class FileApp

benchmarks/file_response_benchmark.py:35–40  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

33
34
35class FileApp:
36 def __init__(self, path: Path) -> None:
37 self.path = path
38
39 async def __call__(self, scope: Scope, receive: Receive, send: Send) -> None:
40 await FileResponse(self.path, media_type="application/octet-stream")(scope, receive, send)
41
42
43def http_scope(case: BenchmarkCase) -> Scope:

Callers 2

warm_file_responseFunction · 0.85
test_file_responseFunction · 0.85

Calls

no outgoing calls

Tested by 1

test_file_responseFunction · 0.68