- Sort Score
- Result 10 results
- Languages All
Results 41 - 50 of 418 for annotated (0.14 sec)
-
docs_src/security/tutorial003_an_py39.py
) return user async def get_current_active_user( current_user: Annotated[User, Depends(get_current_user)], ): if current_user.disabled: raise HTTPException(status_code=400, detail="Inactive user") return current_user @app.post("/token") async def login(form_data: Annotated[OAuth2PasswordRequestForm, Depends()]): user_dict = fake_users_db.get(form_data.username)
Registered: Mon Jun 17 08:32:26 UTC 2024 - Last Modified: Tue Mar 26 16:56:53 UTC 2024 - 2.5K bytes - Viewed (0) -
fastapi/datastructures.py
``` """ file: Annotated[ BinaryIO, Doc("The standard Python file object (non-async)."), ] filename: Annotated[Optional[str], Doc("The original file name.")] size: Annotated[Optional[int], Doc("The size of the file in bytes.")] headers: Annotated[Headers, Doc("The headers of the request.")] content_type: Annotated[
Registered: Mon Jun 17 08:32:26 UTC 2024 - Last Modified: Tue Apr 02 02:48:51 UTC 2024 - 5.6K bytes - Viewed (0) -
docs_src/dependencies/tutorial005_an_py39.py
from typing import Annotated, Union from fastapi import Cookie, Depends, FastAPI app = FastAPI() def query_extractor(q: Union[str, None] = None): return q def query_or_cookie_extractor( q: Annotated[str, Depends(query_extractor)], last_query: Annotated[Union[str, None], Cookie()] = None, ): if not q: return last_query return q @app.get("/items/") async def read_query(
Registered: Mon Jun 17 08:32:26 UTC 2024 - Last Modified: Tue Mar 26 16:56:53 UTC 2024 - 529 bytes - Viewed (0) -
docs/ru/docs/tutorial/dependencies/dependencies-in-path-operation-decorators.md
Registered: Mon Jun 17 08:32:26 UTC 2024 - Last Modified: Sat Apr 06 15:43:55 UTC 2024 - 6.5K bytes - Viewed (0) -
docs/en/docs/tutorial/request-files.md
``` === "Python 3.10+ non-Annotated" !!! tip Prefer to use the `Annotated` version if possible. ```Python hl_lines="7 15" {!> ../../../docs_src/request_files/tutorial001_02_py310.py!} ``` === "Python 3.8+ non-Annotated" !!! tip Prefer to use the `Annotated` version if possible. ```Python hl_lines="9 17"
Registered: Mon Jun 17 08:32:26 UTC 2024 - Last Modified: Wed Mar 13 19:02:19 UTC 2024 - 10.2K bytes - Viewed (0) -
fastapi/openapi/docs.py
import json from typing import Any, Dict, Optional from fastapi.encoders import jsonable_encoder from starlette.responses import HTMLResponse from typing_extensions import Annotated, Doc swagger_ui_default_parameters: Annotated[ Dict[str, Any], Doc( """ Default configurations for Swagger UI. You can use it as a template to add any other configurations needed. """ ), ] = {
Registered: Mon Jun 17 08:32:26 UTC 2024 - Last Modified: Thu May 23 22:59:02 UTC 2024 - 10.1K bytes - Viewed (0) -
docs_src/dependencies/tutorial005_an.py
from typing import Union from fastapi import Cookie, Depends, FastAPI from typing_extensions import Annotated app = FastAPI() def query_extractor(q: Union[str, None] = None): return q def query_or_cookie_extractor( q: Annotated[str, Depends(query_extractor)], last_query: Annotated[Union[str, None], Cookie()] = None, ): if not q: return last_query return q @app.get("/items/")
Registered: Mon Jun 17 08:32:26 UTC 2024 - Last Modified: Tue Mar 26 16:56:53 UTC 2024 - 558 bytes - Viewed (0) -
fastapi/exceptions.py
Registered: Mon Jun 17 08:32:26 UTC 2024 - Last Modified: Tue Apr 02 02:48:51 UTC 2024 - 4.9K bytes - Viewed (0) -
docs/en/docs/tutorial/dependencies/dependencies-in-path-operation-decorators.md
Registered: Mon Jun 17 08:32:26 UTC 2024 - Last Modified: Sat May 18 23:43:13 UTC 2024 - 4.1K bytes - Viewed (0) -
docs_src/security/tutorial004_an_py39.py
return user async def get_current_active_user( current_user: Annotated[User, Depends(get_current_user)], ): if current_user.disabled: raise HTTPException(status_code=400, detail="Inactive user") return current_user @app.post("/token") async def login_for_access_token( form_data: Annotated[OAuth2PasswordRequestForm, Depends()], ) -> Token:
Registered: Mon Jun 17 08:32:26 UTC 2024 - Last Modified: Mon May 20 17:37:28 UTC 2024 - 4.2K bytes - Viewed (0)