- Sort Score
- Result 10 results
- Languages All
Results 1 - 10 of 30 for nullable (0.14 sec)
-
tests/test_dependency_class.py
@app.get("/callable-gen-dependency") async def get_callable_gen_dependency(value: str = Depends(callable_gen_dependency)): return value @app.get("/async-callable-dependency") async def get_async_callable_dependency( value: str = Depends(async_callable_dependency), ): return value @app.get("/async-callable-gen-dependency") async def get_async_callable_gen_dependency( value: str = Depends(async_callable_gen_dependency), ):
Python - Registered: Sun May 05 07:19:11 GMT 2024 - Last Modified: Sun Aug 09 10:54:05 GMT 2020 - 3.3K bytes - Viewed (0) -
docs_src/custom_request_and_route/tutorial003.py
import time from typing import Callable from fastapi import APIRouter, FastAPI, Request, Response from fastapi.routing import APIRoute class TimedRoute(APIRoute): def get_route_handler(self) -> Callable: original_route_handler = super().get_route_handler() async def custom_route_handler(request: Request) -> Response: before = time.time() response: Response = await original_route_handler(request)
Python - Registered: Sun May 05 07:19:11 GMT 2024 - Last Modified: Thu Mar 26 19:09:53 GMT 2020 - 1K bytes - Viewed (0) -
fastapi/param_functions.py
The parameter is available only for compatibility. """ ), ] = ..., *, default_factory: Annotated[ Union[Callable[[], Any], None], Doc( """ A callable to generate the default value. This doesn't affect `Path` parameters as the value is always required. The parameter is available only for compatibility.
Python - Registered: Sun May 05 07:19:11 GMT 2024 - Last Modified: Thu Apr 18 19:40:57 GMT 2024 - 62.5K bytes - Viewed (0) -
fastapi/params.py
import warnings from enum import Enum from typing import Any, Callable, Dict, List, Optional, Sequence, Union from fastapi.openapi.models import Example from pydantic.fields import FieldInfo from typing_extensions import Annotated, deprecated from ._compat import PYDANTIC_V2, PYDANTIC_VERSION, Undefined _Unset: Any = Undefined class ParamTypes(Enum): query = "query" header = "header" path = "path"
Python - Registered: Sun May 05 07:19:11 GMT 2024 - Last Modified: Thu Apr 18 19:40:57 GMT 2024 - 27.5K bytes - Viewed (1) -
docs/de/docs/reference/dependencies.md
# Abhängigkeiten – `Depends()` und `Security()` ## `Depends()` Abhängigkeiten werden hauptsächlich mit der speziellen Funktion `Depends()` behandelt, die ein Callable entgegennimmt. Hier finden Sie deren Referenz und Parameter. Sie können sie direkt von `fastapi` importieren: ```python from fastapi import Depends ``` ::: fastapi.Depends ## `Security()`
Plain Text - Registered: Sun May 05 07:19:11 GMT 2024 - Last Modified: Sat Mar 30 18:16:45 GMT 2024 - 765 bytes - Viewed (0) -
docs_src/custom_request_and_route/tutorial002.py
from typing import Callable, List from fastapi import Body, FastAPI, HTTPException, Request, Response from fastapi.exceptions import RequestValidationError from fastapi.routing import APIRoute class ValidationErrorLoggingRoute(APIRoute): def get_route_handler(self) -> Callable: original_route_handler = super().get_route_handler() async def custom_route_handler(request: Request) -> Response: try:
Python - Registered: Sun May 05 07:19:11 GMT 2024 - Last Modified: Fri May 13 23:38:22 GMT 2022 - 932 bytes - Viewed (0) -
tests/test_dependency_contextvars.py
from contextvars import ContextVar from typing import Any, Awaitable, Callable, Dict, Optional from fastapi import Depends, FastAPI, Request, Response from fastapi.testclient import TestClient legacy_request_state_context_var: ContextVar[Optional[Dict[str, Any]]] = ContextVar( "legacy_request_state_context_var", default=None ) app = FastAPI() async def set_up_request_state_dependency(): request_state = {"user": "deadpond"}
Python - Registered: Sun May 05 07:19:11 GMT 2024 - Last Modified: Thu Feb 17 12:40:12 GMT 2022 - 1.5K bytes - Viewed (0) -
fastapi/dependencies/models.py
from typing import Any, Callable, List, Optional, Sequence from fastapi._compat import ModelField from fastapi.security.base import SecurityBase class SecurityRequirement: def __init__( self, security_scheme: SecurityBase, scopes: Optional[Sequence[str]] = None ): self.security_scheme = security_scheme self.scopes = scopes class Dependant: def __init__( self, *,
Python - Registered: Sun May 05 07:19:11 GMT 2024 - Last Modified: Fri Jul 07 17:12:13 GMT 2023 - 2.4K bytes - Viewed (0) -
docs/en/docs/tutorial/security/first-steps.md
The `oauth2_scheme` variable is an instance of `OAuth2PasswordBearer`, but it is also a "callable". It could be called as: ```Python oauth2_scheme(some, parameters) ``` So, it can be used with `Depends`. ### Use it
Plain Text - Registered: Sun May 05 07:19:11 GMT 2024 - Last Modified: Wed Mar 13 19:02:19 GMT 2024 - 8.9K bytes - Viewed (0) -
docs/en/docs/release-notes.md
Plain Text - Registered: Sun May 05 07:19:11 GMT 2024 - Last Modified: Fri May 03 23:25:42 GMT 2024 - 388.1K bytes - Viewed (1)