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

Method lifespan

starlette/testclient.py:710–715  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

708 self.exit_stack.close()
709
710 async def lifespan(self) -> None:
711 scope = {"type": "lifespan", "state": self.app_state}
712 try:
713 await self.app(scope, self.stream_receive.receive, self.stream_send.send)
714 finally:
715 await self.stream_send.send(None)
716
717 async def wait_startup(self) -> None:
718 await self.stream_receive.send({"type": "lifespan.startup"})

Callers

nothing calls this directly

Calls 2

appMethod · 0.45
sendMethod · 0.45

Tested by

no test coverage detected