- Sort Score
- Result 10 results
- Languages All
Results 11 - 20 of 34 for Mounting (0.16 sec)
-
docs/zh/docs/advanced/custom-request-and-route.md
这样就可以让同一个路由类处理 gzip 压缩的请求或未压缩的请求。 ```Python hl_lines="8-15" {!../../../docs_src/custom_request_and_route/tutorial001.py!} ``` ### 创建自定义 `GzipRoute` 类 接下来,创建使用 `GzipRequest` 的 `fastapi.routing.APIRoute ` 的自定义子类。 此时,这个自定义子类会覆盖 `APIRoute.get_route_handler()`。 `APIRoute.get_route_handler()` 方法返回的是函数,并且返回的函数接收请求并返回响应。 本例用它根据原始请求创建 `GzipRequest`。 ```Python hl_lines="18-26"
Plain Text - Registered: Sun Mar 31 07:19:09 GMT 2024 - Last Modified: Sat Mar 30 22:45:40 GMT 2024 - 3.8K bytes - Viewed (0) -
fastapi/utils.py
from pydantic import BaseModel, create_model from pydantic.fields import FieldInfo from typing_extensions import Literal if TYPE_CHECKING: # pragma: nocover from .routing import APIRoute # Cache for `create_cloned_field` _CLONED_TYPES_CACHE: MutableMapping[ Type[BaseModel], Type[BaseModel] ] = WeakKeyDictionary()
Python - Registered: Sun May 05 07:19:11 GMT 2024 - Last Modified: Thu Apr 18 19:40:57 GMT 2024 - 7.8K bytes - Viewed (0) -
docs/en/docs/alternatives.md
!!! check "Inspired **FastAPI** to" Be a micro-framework. Making it easy to mix and match the tools and parts needed. Have a simple and easy to use routing system. ### <a href="https://requests.readthedocs.io" class="external-link" target="_blank">Requests</a> **FastAPI** is not actually an alternative to **Requests**. Their scope is very different.
Plain Text - Registered: Sun May 05 07:19:11 GMT 2024 - Last Modified: Thu Apr 18 19:53:19 GMT 2024 - 23.2K 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) -
fastapi/__init__.py
from .param_functions import Path as Path from .param_functions import Query as Query from .param_functions import Security as Security from .requests import Request as Request from .responses import Response as Response from .routing import APIRouter as APIRouter from .websockets import WebSocket as WebSocket
Python - Registered: Sun May 05 07:19:11 GMT 2024 - Last Modified: Thu May 02 22:50:18 GMT 2024 - 1.1K bytes - Viewed (0) -
docs/en/docs/how-to/custom-request-and-route.md
```Python hl_lines="8-15" {!../../../docs_src/custom_request_and_route/tutorial001.py!} ``` ### Create a custom `GzipRoute` class Next, we create a custom subclass of `fastapi.routing.APIRoute` that will make use of the `GzipRequest`. This time, it will overwrite the method `APIRoute.get_route_handler()`. This method returns a function. And that function is what will receive a request and return a response.
Plain Text - Registered: Sun May 05 07:19:11 GMT 2024 - Last Modified: Sun Mar 31 23:52:53 GMT 2024 - 4.4K bytes - Viewed (0) -
docs/em/docs/how-to/custom-request-and-route.md
👈 🌌, 🎏 🛣 🎓 💪 🍵 🗜 🗜 ⚖️ 🗜 📨. ```Python hl_lines="8-15" {!../../../docs_src/custom_request_and_route/tutorial001.py!} ``` ### ✍ 🛃 `GzipRoute` 🎓 ⏭, 👥 ✍ 🛃 🏿 `fastapi.routing.APIRoute` 👈 🔜 ⚒ ⚙️ `GzipRequest`. 👉 🕰, ⚫️ 🔜 📁 👩🔬 `APIRoute.get_route_handler()`. 👉 👩🔬 📨 🔢. & 👈 🔢 ⚫️❔ 🔜 📨 📨 & 📨 📨. 📥 👥 ⚙️ ⚫️ ✍ `GzipRequest` ⚪️➡️ ⏮️ 📨.
Plain Text - Registered: Sun May 05 07:19:11 GMT 2024 - Last Modified: Thu Apr 18 19:53:19 GMT 2024 - 3.6K bytes - Viewed (0) -
docs/en/docs/release-notes.md
## 0.4.0
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) -
docs/en/docs/tutorial/metadata.md
h><th>Type</th><th>Description</th></tr></thead><tbody><tr><td><code>name</code></td><td><code>str</code></td><td>The identifying name of the contact person/organization.</td></tr><tr><td><code>url</code></td><td><code>str</code></td><td>The URL pointing to the contact information. MUST be in the format of a URL.</td></tr><tr><td><code>email</code></td><td><code>str</code></td><td>The email address of the contact person/organization. MUST be in the format of an email address.</td></tr></tbody></table></details>...
Plain Text - Registered: Sun May 05 07:19:11 GMT 2024 - Last Modified: Sun Mar 31 23:52:53 GMT 2024 - 5.8K bytes - Viewed (0) -
docs_src/generate_clients/tutorial003.py
from typing import List from fastapi import FastAPI from fastapi.routing import APIRoute from pydantic import BaseModel def custom_generate_unique_id(route: APIRoute): return f"{route.tags[0]}-{route.name}" app = FastAPI(generate_unique_id_function=custom_generate_unique_id) class Item(BaseModel): name: str price: float class ResponseMessage(BaseModel): message: str
Python - Registered: Sun May 05 07:19:11 GMT 2024 - Last Modified: Fri Mar 04 22:02:18 GMT 2022 - 939 bytes - Viewed (0)