- Sort Score
- Result 10 results
- Languages All
Results 1 - 10 of 17 for original (0.25 sec)
-
docs_src/custom_request_and_route/tutorial002.py
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: return await original_route_handler(request) except RequestValidationError as exc: body = await request.body()
Python - Registered: Sun Apr 28 07:19:10 GMT 2024 - Last Modified: Fri May 13 23:38:22 GMT 2022 - 932 bytes - Viewed (0) -
fastapi/dependencies/utils.py
dependency_overrides_provider and dependency_overrides_provider.dependency_overrides ): original_call = sub_dependant.call call = getattr( dependency_overrides_provider, "dependency_overrides", {} ).get(original_call, original_call) use_path: str = sub_dependant.path # type: ignore use_sub_dependant = get_dependant(
Python - Registered: Sun Apr 28 07:19:10 GMT 2024 - Last Modified: Tue Apr 02 02:52:56 GMT 2024 - 29.5K bytes - Viewed (0) -
fastapi/utils.py
original_type = field.type_ if is_dataclass(original_type) and hasattr(original_type, "__pydantic_model__"): original_type = original_type.__pydantic_model__ use_type = original_type if lenient_issubclass(original_type, BaseModel): original_type = cast(Type[BaseModel], original_type) use_type = cloned_types.get(original_type) if use_type is None:
Python - Registered: Sun Apr 28 07:19:10 GMT 2024 - Last Modified: Thu Apr 18 19:40:57 GMT 2024 - 7.8K bytes - Viewed (0) -
docs_src/custom_request_and_route/tutorial003.py
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) duration = time.time() - before response.headers["X-Response-Time"] = str(duration)
Python - Registered: Sun Apr 28 07:19:10 GMT 2024 - Last Modified: Thu Mar 26 19:09:53 GMT 2020 - 1K bytes - Viewed (0) -
tensorflow/api_template.__init__.py
except (ImportError, AttributeError): pass del importlib # Delete modules that should be hidden from dir(). # Don't fail if these modules are not available. # For e.g. this file will be originally placed under tensorflow/_api/v1 which # does not have "python", "core" directories. Then, it will be copied # to tensorflow/ which does have these two directories. try: del python except NameError: pass
Python - Registered: Tue Apr 30 12:39:09 GMT 2024 - Last Modified: Tue Mar 05 06:27:59 GMT 2024 - 6.7K bytes - Viewed (3) -
.github/actions/people/app/main.py
message = "👥 Update FastAPI People" result = subprocess.run(["git", "commit", "-m", message], check=True) logging.info("Pushing branch") subprocess.run(["git", "push", "origin", branch_name], check=True) logging.info("Creating PR") pr = repo.create_pull(title=message, body=message, base="master", head=branch_name) logging.info(f"Created PR: {pr.number}")
Python - Registered: Sun Apr 28 07:19:10 GMT 2024 - Last Modified: Tue Mar 26 17:38:21 GMT 2024 - 19.2K bytes - Viewed (1) -
tests/test_application.py
assert response.status_code == 200, response.text assert response.headers["content-type"] == "text/html; charset=utf-8" assert "swagger-ui-dist" in response.text assert ( "oauth2RedirectUrl: window.location.origin + '/docs/oauth2-redirect'" in response.text ) def test_swagger_ui_oauth2_redirect(): response = client.get("/docs/oauth2-redirect") assert response.status_code == 200, response.text
Python - Registered: Sun Apr 28 07:19:10 GMT 2024 - Last Modified: Thu Apr 18 21:56:59 GMT 2024 - 52.2K bytes - Viewed (0) -
docs_src/custom_request_and_route/tutorial001.py
return self._body class GzipRoute(APIRoute): def get_route_handler(self) -> Callable: original_route_handler = super().get_route_handler() async def custom_route_handler(request: Request) -> Response: request = GzipRequest(request.scope, request.receive) return await original_route_handler(request) return custom_route_handler app = FastAPI()
Python - Registered: Sun Apr 28 07:19:10 GMT 2024 - Last Modified: Fri May 13 23:38:22 GMT 2022 - 973 bytes - Viewed (0) -
fastapi/datastructures.py
return {"filename": file.filename} ``` """ 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[
Python - Registered: Sun Apr 28 07:19:10 GMT 2024 - Last Modified: Tue Apr 02 02:48:51 GMT 2024 - 5.6K bytes - Viewed (0) -
fastapi/applications.py
Python - Registered: Sun Apr 28 07:19:10 GMT 2024 - Last Modified: Tue Apr 02 02:48:51 GMT 2024 - 172.2K bytes - Viewed (0)