- Sort Score
- Num 10 results
- Language All
Results 1 - 2 of 2 for iscoroutinefunction (0.07 seconds)
The search processing time has exceeded the limit. The displayed results may be partial.
-
tests/test_dependency_wrapped.py
from fastapi.testclient import TestClient if sys.version_info >= (3, 13): # pragma: no cover from inspect import iscoroutinefunction else: # pragma: no cover from asyncio import iscoroutinefunction def noop_wrap(func): @wraps(func) def wrapper(*args, **kwargs): return func(*args, **kwargs) return wrapper
Created: Sun Dec 28 07:19:09 GMT 2025 - Last Modified: Wed Dec 17 21:25:59 GMT 2025 - 11.2K bytes - Click Count (0) -
fastapi/routing.py
def websocket_session( func: Callable[[WebSocket], Awaitable[None]], ) -> ASGIApp: """ Takes a coroutine `func(session)`, and returns an ASGI application. """ # assert asyncio.iscoroutinefunction(func), "WebSocket endpoints must be async" async def app(scope: Scope, receive: Receive, send: Send) -> None: session = WebSocket(scope, receive=receive, send=send)
Created: Sun Dec 28 07:19:09 GMT 2025 - Last Modified: Sat Dec 27 12:54:56 GMT 2025 - 174.6K bytes - Click Count (0)