コンテンツにスキップ
per page, with , order by , clip by
Results of 1 - 4 of about 4 for connection (0.003 sec.)
Test Client - TestClient 11835
Test Client - TestClient You can use the TestClient class to test FastAPI applications without creating an actual HTTP and socket connection, just communicating directly with the FastAPI code. Read more about it in the FastAPI docs for Test ...
https://man.mtool.work/fastapi/0.115/reference/testclient/
WebSocket 10059
WebSocket FastAPI で WebSocket が使用できます。 WebSockets のインストール まず WebSockets のインストールが必要です。 $ pip install websockets ---> 100% WebSocket クライアント 本番環境 本番環境では、React、Vue.js、Angularなどの最新のフレーム ... mentById("messageText") ws.send(input.value) input.value = '' event.preventDefault() } </script> </body> </html> """ class ConnectionManager : def __init__ ( self ): self . active_connections : List [ WebSocket ] = [] async def connect ( self , websocket : ... WebSocket ): await websocket . accept () self . active_connections . append ( websocket ) def disconnect ( self , websocket : WebSocket ): self . active_connections . remove ( websocket ) ... : str , websocket : WebSocket ): await websocket . send_text ( message ) async def broadcast ( self , message : str ): for connection in self . active_connections : await connection . send_text ( message ) manager = ConnectionManager () @app . get ( "/" ) ...
https://man.mtool.work/fastapi/0.115/advanced/websockets/
Lifespan Events 7970
Lifespan Events Warning The current page still doesn't have a translation for this language. But you can help translating it: Contributing . You can define logic (code) that should be executed before the application starts up . This means t ... or the whole app, and that are shared among requests, and/or that you need to clean up afterwards. For example, a database connection pool, or loading a shared machine learning model. Use Case Let's start with an example use case and then see how to solve ...
https://man.mtool.work/fastapi/0.115/advanced/events/
Release Notes 7082
Release Notes Latest Changes 0.115.11 Fixes ? Add docs examples and tests (support) for Annotated custom validations, like AfterValidator , revert #13440 . PR #13442 by @tiangolo . New docs: Query Parameters and String Validations - Custom ... cs/de/docs/reference/websockets.md . PR #10822 by @nilslindemann . ? Add German translation for docs/de/docs/reference/httpconnection.md . PR #10823 by @nilslindemann . ? Add German translation for docs/de/docs/reference/response.md . PR #10824 by @nilslin ... se to travel through the network while unnecessarily holding a resource in a dependency with yield (for example a database connection), this was changed in FastAPI 0.106.0. Additionally, a background task is normally an independent set of logic that should ... be handled separately, with its own resources (e.g. its own database connection). If you used to rely on this behavior, now you should create the resources for background tasks inside the background tas ...
https://man.mtool.work/fastapi/0.115/release-notes/
PREV 1 NEXT