Browse Source

docs: add module-level docstring to websockets module

Documents the WebSocket re-exports from Starlette, clarifying that this
module provides a consistent FastAPI import path for WebSocket classes.
pull/15657/head
SUPREME 1 week ago
parent
commit
21d1d8ec6a
  1. 8
      fastapi/websockets.py

8
fastapi/websockets.py

@ -1,3 +1,11 @@
"""
WebSocket support for FastAPI.
Re-exports Starlette's WebSocket classes for use in FastAPI applications,
providing a consistent import path for WebSocket, WebSocketDisconnect, and
WebSocketState.
"""
from starlette.websockets import WebSocket as WebSocket # noqa
from starlette.websockets import WebSocketDisconnect as WebSocketDisconnect # noqa
from starlette.websockets import WebSocketState as WebSocketState # noqa

Loading…
Cancel
Save