MCPcopy Create free account
hub / github.com/aio-libs/aiohttp / init

Function init

examples/background_tasks.py:59–66  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

57
58
59def init():
60 app = web.Application()
61 l: list[web.WebSocketResponse] = []
62 app[websockets] = l
63 app.router.add_get("/news", websocket_handler)
64 app.cleanup_ctx.append(background_tasks)
65 app.on_shutdown.append(on_shutdown)
66 return app
67
68
69web.run_app(init())

Callers 1

Calls 2

add_getMethod · 0.80
appendMethod · 0.80

Tested by

no test coverage detected