- Sort Score
- Result 10 results
- Languages All
Results 1 - 10 of 22 for receive_text (0.14 sec)
-
tests/test_tutorial/test_websockets/test_tutorial002_an.py
data = websocket.receive_text() assert data == "Session cookie or query token value is: fakesession" data = websocket.receive_text() assert data == f"Message text was: {message}, for item ID: foo" message = "Message two" websocket.send_text(message) data = websocket.receive_text()
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Sat Mar 18 12:29:59 UTC 2023 - 3.6K bytes - Viewed (0) -
tests/test_tutorial/test_websockets/test_tutorial002_py310.py
data = websocket.receive_text() assert data == "Session cookie or query token value is: fakesession" data = websocket.receive_text() assert data == f"Message text was: {message}, for item ID: foo" message = "Message two" websocket.send_text(message) data = websocket.receive_text()
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Sat Mar 18 12:29:59 UTC 2023 - 3.9K bytes - Viewed (0) -
tests/test_tutorial/test_websockets/test_tutorial002_an_py310.py
data = websocket.receive_text() assert data == "Session cookie or query token value is: fakesession" data = websocket.receive_text() assert data == f"Message text was: {message}, for item ID: foo" message = "Message two" websocket.send_text(message) data = websocket.receive_text()
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Sat Mar 18 12:29:59 UTC 2023 - 3.9K bytes - Viewed (0) -
tests/test_tutorial/test_websockets/test_tutorial002_an_py39.py
assert data == "Session cookie or query token value is: some-token" data = websocket.receive_text() assert data == f"Message text was: {message}, for item ID: bar" message = "Message two" websocket.send_text(message) data = websocket.receive_text() assert data == "Session cookie or query token value is: some-token" data = websocket.receive_text()
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Sat Mar 18 12:29:59 UTC 2023 - 3.9K bytes - Viewed (0) -
tests/test_ws_router.py
assert websocket.receive_text() == "Override" def test_router_with_params(): client = TestClient(app) with client.websocket_connect( "/router/path/to/file?queryparam=a_query_param" ) as websocket: data = websocket.receive_text() assert data == "path/to/file" data = websocket.receive_text() assert data == "a_query_param"
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Sun Jun 11 19:08:14 UTC 2023 - 7.5K bytes - Viewed (0) -
tests/test_tutorial/test_websockets/test_tutorial003_py39.py
data1 = connection.receive_text() assert data1 == "You wrote: Hello from 1234" data2 = connection_two.receive_text() client1_says = "Client #1234 says: Hello from 1234" assert data2 == client1_says data1 = connection.receive_text() assert data1 == client1_says connection_two.close() data1 = connection.receive_text()
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Sat Mar 18 12:29:59 UTC 2023 - 1.3K bytes - Viewed (0) -
tests/test_ws_dependencies.py
client = TestClient(app) with client.websocket_connect("/") as websocket: data = json.loads(websocket.receive_text()) assert data == ["app", "index"] def test_routerindex(): client = TestClient(app) with client.websocket_connect("/router") as websocket: data = json.loads(websocket.receive_text()) assert data == ["app", "router2", "router", "routerindex"] def test_routerprefixindex():
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Sun Jun 11 20:35:39 UTC 2023 - 2.1K bytes - Viewed (0) -
docs_src/websockets/tutorial003_py39.py
@app.websocket("/ws/{client_id}") async def websocket_endpoint(websocket: WebSocket, client_id: int): await manager.connect(websocket) try: while True: data = await websocket.receive_text() await manager.send_personal_message(f"You wrote: {data}", websocket) await manager.broadcast(f"Client #{client_id} says: {data}") except WebSocketDisconnect: manager.disconnect(websocket)
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Sat Mar 18 12:29:59 UTC 2023 - 2.5K bytes - Viewed (0) -
docs/en/docs/reference/websockets.md
- client - state - url_for - client_state - application_state - receive - send - accept - receive_text - receive_bytes - receive_json - iter_text - iter_bytes - iter_json - send_text - send_bytes - send_json
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Tue Aug 06 04:48:30 UTC 2024 - 1.7K bytes - Viewed (0) -
docs_src/websockets/tutorial002_an_py310.py
websocket: WebSocket, item_id: str, q: int | None = None, cookie_or_token: Annotated[str, Depends(get_cookie_or_token)], ): await websocket.accept() while True: data = await websocket.receive_text() await websocket.send_text( f"Session cookie or query token value is: {cookie_or_token}" ) if q is not None: await websocket.send_text(f"Query parameter q is: {q}")
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Sat Mar 18 12:29:59 UTC 2023 - 2.8K bytes - Viewed (0)