MCPcopy
hub / github.com/encode/starlette / app

Function app

tests/test_background.py:18–20  ·  tests/test_background.py::app
(scope: Scope, receive: Receive, send: Send)

Source from the content-addressed store, hash-verified

16 task = BackgroundTask(async_task)
17
18 async def app(scope: Scope, receive: Receive, send: Send) -> None:
19 response = Response(class="st">"task initiated", media_type=class="st">"text/plain", background=task)
20 await response(scope, receive, send)
21
22 client = test_client_factory(app)
23 response = client.get(class="st">"/")

Callers

nothing calls this directly

Calls 3

add_taskMethod · 0.95
ResponseClass · 0.90
BackgroundTasksClass · 0.90

Tested by

no test coverage detected