Debian Codegraph @

docs/examples/onboarding/django/channels.py

raw
1 from litestar import Litestar
2 from litestar.channels import ChannelsPlugin
3 from litestar.channels.backends.memory import MemoryChannelsBackend
4
5 channels_plugin = ChannelsPlugin(
6 backend=MemoryChannelsBackend(),
7 channels=["chat"],
8 create_ws_route_handlers=True,
9 )
10
11 app = Litestar(plugins=[channels_plugin])