- Sort Score
- Result 10 results
- Languages All
Results 21 - 30 of 364 for if (0.14 sec)
-
docs/en/docs/tutorial/testing.md
``` === "Python 3.10+ non-Annotated" !!! tip Prefer to use the `Annotated` version if possible. ```Python {!> ../../../docs_src/app_testing/app_b_py310/main.py!} ``` === "Python 3.8+ non-Annotated" !!! tip Prefer to use the `Annotated` version if possible. ```Python {!> ../../../docs_src/app_testing/app_b/main.py!} ```
Plain Text - Registered: Sun May 05 07:19:11 GMT 2024 - Last Modified: Thu Apr 18 19:53:19 GMT 2024 - 6.2K bytes - Viewed (0) -
docs/en/docs/tutorial/path-params.md
```Python hl_lines="6-7" {!../../../docs_src/path_params/tutorial001.py!} ``` The value of the path parameter `item_id` will be passed to your function as the argument `item_id`. So, if you run this example and go to <a href="http://127.0.0.1:8000/items/foo" class="external-link" target="_blank">http://127.0.0.1:8000/items/foo</a>, you will see a response of: ```JSON {"item_id":"foo"} ```
Plain Text - Registered: Sun May 05 07:19:11 GMT 2024 - Last Modified: Fri Mar 22 01:42:11 GMT 2024 - 9.1K bytes - Viewed (0) -
docs/en/docs/advanced/dataclasses.md
!!! info Keep in mind that dataclasses can't do everything Pydantic models can do. So, you might still need to use Pydantic models. But if you have a bunch of dataclasses laying around, this is a nice trick to use them to power a web API using FastAPI. 🤓 ## Dataclasses in `response_model` You can also use `dataclasses` in the `response_model` parameter:
Plain Text - Registered: Sun May 05 07:19:11 GMT 2024 - Last Modified: Thu Apr 18 19:53:19 GMT 2024 - 4.1K bytes - Viewed (0) -
docs_src/websockets/tutorial002_an_py310.py
async def get(): return HTMLResponse(html) async def get_cookie_or_token( websocket: WebSocket, session: Annotated[str | None, Cookie()] = None, token: Annotated[str | None, Query()] = None, ): if session is None and token is None: raise WebSocketException(code=status.WS_1008_POLICY_VIOLATION) return session or token @app.websocket("/items/{item_id}/ws") async def websocket_endpoint( *,
Python - Registered: Sun May 05 07:19:11 GMT 2024 - Last Modified: Sat Mar 18 12:29:59 GMT 2023 - 2.8K bytes - Viewed (0) -
docs_src/path_params_numeric_validations/tutorial002.py
Python - Registered: Sun May 05 07:19:11 GMT 2024 - Last Modified: Fri May 13 23:38:22 GMT 2022 - 265 bytes - Viewed (0) -
docs_src/path_params_numeric_validations/tutorial002_an_py39.py
Python - Registered: Sun May 05 07:19:11 GMT 2024 - Last Modified: Sat Mar 18 12:29:59 GMT 2023 - 311 bytes - Viewed (0) -
docs_src/query_params_str_validations/tutorial005.py
Python - Registered: Sun May 05 07:19:11 GMT 2024 - Last Modified: Fri May 13 23:38:22 GMT 2022 - 276 bytes - Viewed (0) -
docs_src/query_params_str_validations/tutorial003_py310.py
Python - Registered: Sun May 05 07:19:11 GMT 2024 - Last Modified: Fri May 13 23:38:22 GMT 2022 - 290 bytes - Viewed (0) -
docs_src/query_params_str_validations/tutorial009_an_py310.py
Python - Registered: Sun May 05 07:19:11 GMT 2024 - Last Modified: Sat Mar 18 12:29:59 GMT 2023 - 314 bytes - Viewed (0) -
docs_src/query_params_str_validations/tutorial003.py
Python - Registered: Sun May 05 07:19:11 GMT 2024 - Last Modified: Tue Mar 26 16:56:53 GMT 2024 - 329 bytes - Viewed (0)