- Sort Score
- Result 10 results
- Languages All
Results 1 - 10 of 56 for closure (0.16 sec)
-
tests/test_ws_router.py
await websocket.close(code=status.WS_1006_ABNORMAL_CLOSURE, reason=repr(e)) myapp = make_app(middleware=[Middleware(errorhandler)]) client = TestClient(myapp) with pytest.raises(WebSocketDisconnect) as e: with client.websocket_connect("/depends-err/"): pass # pragma: no cover assert e.value.code == status.WS_1006_ABNORMAL_CLOSURE
Python - Registered: Sun Apr 28 07:19:10 GMT 2024 - Last Modified: Sun Jun 11 19:08:14 GMT 2023 - 7.5K bytes - Viewed (0) -
tests/test_ws_dependencies.py
await websocket.accept() await websocket.send_text(json.dumps(deps)) await websocket.close() @router.websocket("/router", dependencies=[create_dependency("routerindex")]) async def routerindex(websocket: WebSocket, deps: DepList): await websocket.accept() await websocket.send_text(json.dumps(deps)) await websocket.close() @prefix_router.websocket("/", dependencies=[create_dependency("routerprefixindex")])
Python - Registered: Sun Apr 28 07:19:10 GMT 2024 - Last Modified: Sun Jun 11 20:35:39 GMT 2023 - 2.1K bytes - Viewed (0) -
scripts/playwright/separate_openapi_schemas/image03.py
page.screenshot( path="docs/en/docs/img/tutorial/separate-openapi-schemas/image03.png" ) # --------------------- context.close() browser.close() process = subprocess.Popen( ["uvicorn", "docs_src.separate_openapi_schemas.tutorial001:app"] ) try: with sync_playwright() as playwright: run(playwright) finally:
Python - Registered: Sun May 05 07:19:11 GMT 2024 - Last Modified: Fri Aug 25 19:10:22 GMT 2023 - 892 bytes - Viewed (0) -
docs/em/docs/tutorial/request-files.md
* `read(size)`: โ `size` (`int`) ๐ข/๐ฆน ๐. * `seek(offset)`: ๐ถ ๐ข ๐ง `offset` (`int`) ๐. * ๐คถ โ., `await myfile.seek(0)` ๐ ๐ถ โถ๏ธ ๐. * ๐ โด๏ธ โ ๐ฅ ๐ ๐ `await myfile.read()` ๐ & โคด๏ธ ๐ช โ ๐ ๐. * `close()`: ๐ ๐. ๐ ๐ซ ๐ฉโ๐ฌ `async` ๐ฉโ๐ฌ, ๐ ๐ช "โ" ๐ซ. ๐ผ, ๐ `async` *โก ๐ ๏ธ ๐ข* ๐ ๐ช ๐ค ๐ โฎ๏ธ: ```Python contents = await myfile.read() ```
Plain Text - Registered: Sun May 05 07:19:11 GMT 2024 - Last Modified: Wed Mar 13 19:02:19 GMT 2024 - 6.6K bytes - Viewed (0) -
docs/ko/docs/tutorial/request-files.md
* `read(size)`: ํ์ผ์ ๋ฐ์ดํธ ๋ฐ ๊ธ์์ `size`(`int`)๋ฅผ ์ฝ์ต๋๋ค. * `seek(offset)`: ํ์ผ ๋ด `offset`(`int`) ์์น์ ๋ฐ์ดํธ๋ก ์ด๋ํฉ๋๋ค. * ์) `await myfile.seek(0)` ๋ฅผ ์ฌ์ฉํ๋ฉด ํ์ผ์ ์์๋ถ๋ถ์ผ๋ก ์ด๋ํฉ๋๋ค. * `await myfile.read()` ๋ฅผ ์ฌ์ฉํ ํ ๋ด์ฉ์ ๋ค์ ์ฝ์ ๋ ์ ์ฉํฉ๋๋ค. * `close()`: ํ์ผ์ ๋ซ์ต๋๋ค. ์๊ธฐ ๋ชจ๋ ๋ฉ์๋๋ค์ด `async` ๋ฉ์๋์ด๊ธฐ ๋๋ฌธ์ โawaitโ์ ์ฌ์ฉํ์ฌ์ผ ํฉ๋๋ค. ์๋ฅผ๋ค์ด, `async` *๊ฒฝ๋ก ์๋ ํจ์*์ ๋ด๋ถ์์ ๋ค์๊ณผ ๊ฐ์ ๋ฐฉ์์ผ๋ก ๋ด์ฉ์ ๊ฐ์ ธ์ฌ ์ ์์ต๋๋ค: ```Python contents = await myfile.read() ```
Plain Text - Registered: Sun May 05 07:19:11 GMT 2024 - Last Modified: Wed Mar 13 19:02:19 GMT 2024 - 8.1K bytes - Viewed (0) -
docs/en/docs/alternatives.md
Routes are declared in a single place, using functions declared in other places (instead of using decorators that can be placed right on top of the function that handles the endpoint). This is closer to how Django does it than to how Flask (and Starlette) does it. It separates in the code things that are relatively tightly coupled. !!! check "Inspired **FastAPI** to"
Plain Text - Registered: Sun May 05 07:19:11 GMT 2024 - Last Modified: Thu Apr 18 19:53:19 GMT 2024 - 23.2K bytes - Viewed (0) -
docs_src/dependencies/tutorial009.py
try: yield dep_a finally: dep_a.close() async def dependency_b(dep_a=Depends(dependency_a)): dep_b = generate_dep_b() try: yield dep_b finally: dep_b.close(dep_a) async def dependency_c(dep_b=Depends(dependency_b)): dep_c = generate_dep_c() try: yield dep_c finally:
Python - Registered: Sun May 05 07:19:11 GMT 2024 - Last Modified: Thu Mar 26 19:09:53 GMT 2020 - 455 bytes - Viewed (0) -
scripts/playwright/separate_openapi_schemas/image02.py
page.get_by_role("button", name="Execute").click() page.screenshot( path="docs/en/docs/img/tutorial/separate-openapi-schemas/image02.png" ) # --------------------- context.close() browser.close() process = subprocess.Popen( ["uvicorn", "docs_src.separate_openapi_schemas.tutorial001:app"] ) try: with sync_playwright() as playwright: run(playwright) finally:
Python - Registered: Sun May 05 07:19:11 GMT 2024 - Last Modified: Fri Aug 25 19:10:22 GMT 2023 - 873 bytes - Viewed (0) -
docs/en/docs/reference/uploadfile.md
members: - file - filename - size - headers - content_type - read - write - seek
Plain Text - Registered: Sun May 05 07:19:11 GMT 2024 - Last Modified: Thu Apr 18 19:53:19 GMT 2024 - 472 bytes - Viewed (0) -
tests/test_tutorial/test_websockets/test_tutorial003.py
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()
Python - Registered: Sun Apr 28 07:19:10 GMT 2024 - Last Modified: Thu Jul 29 09:26:07 GMT 2021 - 872 bytes - Viewed (0)