- Sort Score
- Result 10 results
- Languages All
Results 1 - 10 of 29 for connected (0.18 sec)
-
docs/en/docs/advanced/events.md
So, we declare the event handler function with standard `def` instead of `async def`. ### `startup` and `shutdown` together There's a high chance that the logic for your *startup* and *shutdown* is connected, you might want to start something and then finish it, acquire a resource and then release it, etc.
Plain Text - Registered: Sun May 05 07:19:11 GMT 2024 - Last Modified: Thu Apr 18 19:53:19 GMT 2024 - 7.8K bytes - Viewed (0) -
docs/en/docs/tutorial/testing.md
!!! info Note that the `TestClient` receives data that can be converted to JSON, not Pydantic models.
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) -
tests/test_typing_python39.py
@needs_py310 def test_typing(): types = { list[int]: [1, 2, 3], dict[str, list[int]]: {"a": [1, 2, 3], "b": [4, 5, 6]}, set[int]: [1, 2, 3], # `set` is converted to `list` tuple[int, ...]: [1, 2, 3], # `tuple` is converted to `list` } for test_type, expect in types.items(): app = FastAPI() @app.post("/", response_model=test_type) def post_endpoint(input: test_type):
Python - Registered: Sun Apr 28 07:19:10 GMT 2024 - Last Modified: Sat Mar 18 12:29:59 GMT 2023 - 709 bytes - Viewed (0) -
tests/test_tutorial/test_schema_extra_example/test_tutorial005_an.py
"tax": 3.2, }, }, "converted": { "summary": "An example with converted data", "description": "FastAPI can convert price `strings` to actual `numbers` automatically",
Python - Registered: Sun Apr 28 07:19:10 GMT 2024 - Last Modified: Sat Aug 26 18:03:13 GMT 2023 - 6.7K bytes - Viewed (0) -
docs/en/docs/advanced/dataclasses.md
You can also use `dataclasses` in the `response_model` parameter: ```Python hl_lines="1 7-13 19" {!../../../docs_src/dataclasses/tutorial002.py!} ``` The dataclass will be automatically converted to a Pydantic dataclass. This way, its schema will show up in the API docs user interface: <img src="/img/tutorial/dataclasses/image01.png"> ## Dataclasses in Nested Data Structures
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/em/docs/advanced/path-operation-advanced-configuration.md
๐ ๐ช ๐ โฎ๏ธ `openapi_extra`: ```Python hl_lines="20-37 39-40" {!../../../docs_src/path_operation_advanced_configuration/tutorial006.py!} ``` ๐ ๐ผ, ๐ฅ ๐ซ ๐ฃ ๐ Pydantic ๐ท. ๐, ๐จ ๐ช ๐ซ <abbr title="converted from some plain format, like bytes, into Python objects">๐ป</abbr> ๐ป, โซ๏ธ โ ๐ `bytes`, & ๐ข `magic_data_reader()` ๐ ๐ ๐ป โซ๏ธ ๐. ๐, ๐ฅ ๐ช ๐ฃ ๐ ๐ ๐จ ๐ช. ### ๐ ๐ ๐ ๐
Plain Text - Registered: Sun May 05 07:19:11 GMT 2024 - Last Modified: Thu Apr 18 19:53:19 GMT 2024 - 5.7K bytes - Viewed (0) -
docs/en/docs/tutorial/path-params.md
#### Return *enumeration members* You can return *enum members* from your *path operation*, even nested in a JSON body (e.g. a `dict`). They will be converted to their corresponding values (strings in this case) before returning them to the client: ```Python hl_lines="18 21 23" {!../../../docs_src/path_params/tutorial005.py!} ```
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) -
tests/test_security_openid_connect.py
from fastapi import Depends, FastAPI, Security from fastapi.security.open_id_connect_url import OpenIdConnect from fastapi.testclient import TestClient from pydantic import BaseModel app = FastAPI() oid = OpenIdConnect(openIdConnectUrl="/openid") class User(BaseModel): username: str def get_current_user(oauth_header: str = Security(oid)): user = User(username=oauth_header) return user
Python - Registered: Sun Apr 28 07:19:10 GMT 2024 - Last Modified: Fri Jun 30 18:25:16 GMT 2023 - 2.2K bytes - Viewed (0) -
docs/fr/docs/tutorial/debugging.md
# <abbr title="En anglais: Debugging">Dรฉbogage</abbr> Vous pouvez connecter le <abbr title="En anglais: debugger">dรฉbogueur</abbr> dans votre รฉditeur, par exemple avec Visual Studio Code ou PyCharm. ## Faites appel ร `uvicorn` Dans votre application FastAPI, importez et exรฉcutez directement `uvicorn` : ```Python hl_lines="1 15" {!../../../docs_src/debugging/tutorial001.py!} ``` ### ร propos de `__name__ == "__main__"`
Plain Text - Registered: Sun May 05 07:19:11 GMT 2024 - Last Modified: Mon Mar 06 16:26:49 GMT 2023 - 2.9K bytes - Viewed (0) -
tests/test_tutorial/test_configure_swagger_ui/test_tutorial001.py
def test_swagger_ui(): response = client.get("/docs") assert response.status_code == 200, response.text assert ( '"syntaxHighlight": false' in response.text ), "syntaxHighlight should be included and converted to JSON" assert ( '"dom_id": "#swagger-ui"' in response.text ), "default configs should be preserved" assert "presets: [" in response.text, "default configs should be preserved" assert (
Python - Registered: Sun Apr 28 07:19:10 GMT 2024 - Last Modified: Sat Aug 19 19:54:04 GMT 2023 - 1.4K bytes - Viewed (0)