- Sort Score
- Result 10 results
- Languages All
Results 51 - 60 of 176 for annotated (0.18 sec)
-
docs_src/dependencies/tutorial008c_an.py
from typing_extensions import Annotated app = FastAPI() class InternalError(Exception): pass def get_username(): try: yield "Rick" except InternalError: print("Oops, we didn't raise again, Britney 😱") @app.get("/items/{item_id}") def get_item(item_id: str, username: Annotated[str, Depends(get_username)]): if item_id == "portal-gun":
Registered: Mon Jun 17 08:32:26 UTC 2024 - Last Modified: Sat Feb 24 23:06:37 UTC 2024 - 710 bytes - Viewed (0) -
docs_src/query_params_str_validations/tutorial014_an_py310.py
from typing import Annotated from fastapi import FastAPI, Query app = FastAPI() @app.get("/items/") async def read_items( hidden_query: Annotated[str | None, Query(include_in_schema=False)] = None, ): if hidden_query: return {"hidden_query": hidden_query} else:
Registered: Mon Jun 17 08:32:26 UTC 2024 - Last Modified: Tue Mar 26 16:56:53 UTC 2024 - 331 bytes - Viewed (0) -
docs_src/query_params_str_validations/tutorial014_an.py
from typing import Union from fastapi import FastAPI, Query from typing_extensions import Annotated app = FastAPI() @app.get("/items/") async def read_items( hidden_query: Annotated[Union[str, None], Query(include_in_schema=False)] = None, ): if hidden_query: return {"hidden_query": hidden_query} else:
Registered: Mon Jun 17 08:32:26 UTC 2024 - Last Modified: Tue Mar 26 16:56:53 UTC 2024 - 373 bytes - Viewed (0) -
docs_src/query_params_str_validations/tutorial007_an_py310.py
Registered: Mon Jun 17 08:32:26 UTC 2024 - Last Modified: Tue Mar 26 16:56:53 UTC 2024 - 337 bytes - Viewed (0) -
docs_src/query_params_str_validations/tutorial003_an.py
from typing import Union from fastapi import FastAPI, Query from typing_extensions import Annotated app = FastAPI() @app.get("/items/") async def read_items( q: Annotated[Union[str, None], Query(min_length=3, max_length=50)] = None, ): results = {"items": [{"item_id": "Foo"}, {"item_id": "Bar"}]} if q: results.update({"q": q})
Registered: Mon Jun 17 08:32:26 UTC 2024 - Last Modified: Tue Mar 26 16:56:53 UTC 2024 - 372 bytes - Viewed (0) -
docs_src/dependencies/tutorial008d_an_py39.py
from typing import Annotated from fastapi import Depends, FastAPI, HTTPException app = FastAPI() class InternalError(Exception): pass def get_username(): try: yield "Rick" except InternalError: print("We don't swallow the internal error here, we raise again 😎") raise @app.get("/items/{item_id}") def get_item(item_id: str, username: Annotated[str, Depends(get_username)]):
Registered: Mon Jun 17 08:32:26 UTC 2024 - Last Modified: Sat Feb 24 23:06:37 UTC 2024 - 734 bytes - Viewed (0) -
docs/en/docs/tutorial/request-forms.md
``` === "Python 3.8+" ```Python hl_lines="1" {!> ../../../docs_src/request_forms/tutorial001_an.py!} ``` === "Python 3.8+ non-Annotated" !!! tip Prefer to use the `Annotated` version if possible. ```Python hl_lines="1" {!> ../../../docs_src/request_forms/tutorial001.py!} ``` ## Define `Form` parameters
Registered: Mon Jun 17 08:32:26 UTC 2024 - Last Modified: Wed Mar 13 19:02:19 UTC 2024 - 3.2K bytes - Viewed (0) -
docs/de/docs/tutorial/extra-data-types.md
``` === "Python 3.10+ nicht annotiert" !!! tip Bevorzugen Sie die `Annotated`-Version, falls möglich. ```Python hl_lines="1 2 11-15" {!> ../../../docs_src/extra_data_types/tutorial001_py310.py!} ``` === "Python 3.8+ nicht annotiert" !!! tip Bevorzugen Sie die `Annotated`-Version, falls möglich. ```Python hl_lines="1 2 12-16"
Registered: Mon Jun 17 08:32:26 UTC 2024 - Last Modified: Sat Mar 30 18:08:55 UTC 2024 - 4.4K bytes - Viewed (0) -
docs_src/dependencies/tutorial008d_an.py
from typing_extensions import Annotated app = FastAPI() class InternalError(Exception): pass def get_username(): try: yield "Rick" except InternalError: print("We don't swallow the internal error here, we raise again 😎") raise @app.get("/items/{item_id}") def get_item(item_id: str, username: Annotated[str, Depends(get_username)]):
Registered: Mon Jun 17 08:32:26 UTC 2024 - Last Modified: Sat Feb 24 23:06:37 UTC 2024 - 744 bytes - Viewed (0) -
docs/ru/docs/tutorial/request-forms.md
``` === "Python 3.8+" ```Python hl_lines="1" {!> ../../../docs_src/request_forms/tutorial001_an.py!} ``` === "Python 3.8+ без Annotated" !!! tip "Подсказка" Рекомендуется использовать 'Annotated' версию, если это возможно. ```Python hl_lines="1" {!> ../../../docs_src/request_forms/tutorial001.py!} ``` ## Определение параметров `Form`
Registered: Mon Jun 17 08:32:26 UTC 2024 - Last Modified: Wed Mar 13 19:02:19 UTC 2024 - 5K bytes - Viewed (0)