- Sort Score
- Result 10 results
- Languages All
Results 501 - 510 of 580 for url_lines (0.07 sec)
-
docs/zh/docs/advanced/testing-dependencies.md
### 使用 `app.dependency_overrides` 属性 对于这些用例,**FastAPI** 应用支持 `app.dependency_overrides` 属性,该属性就是**字典**。 要在测试时覆盖原有依赖项,这个字典的键应当是原依赖项(函数),值是覆盖依赖项(另一个函数)。 这样一来,**FastAPI** 就会调用覆盖依赖项,不再调用原依赖项。 ```Python hl_lines="26-27 30" {!../../docs_src/dependency_testing/tutorial001.py!} ``` /// tip | "提示" **FastAPI** 应用中的任何位置都可以实现覆盖依赖项。 原依赖项可用于*路径操作函数*、*路径操作装饰器*(不需要返回值时)、`.include_router()` 调用等。 FastAPI 可以覆盖这些位置的依赖项。
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Sun Oct 06 20:36:54 UTC 2024 - 1.9K bytes - Viewed (0) -
docs/en/docs/advanced/using-request-directly.md
## Use the `Request` object directly Let's imagine you want to get the client's IP address/host inside of your *path operation function*. For that you need to access the request directly. ```Python hl_lines="1 7-8" {!../../docs_src/using_request_directly/tutorial001.py!} ``` By declaring a *path operation function* parameter with the type being the `Request` **FastAPI** will know to pass the `Request` in that parameter.
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Sun Oct 06 20:36:54 UTC 2024 - 2.3K bytes - Viewed (0) -
docs/em/docs/contributing.md
``` * 🔎 🥉 🌐❔ 👈 `docs/features.md` 🔎 📁 📁. 👱 💖: ```YAML hl_lines="8" site_name: FastAPI # More stuff nav: - FastAPI: index.md - Languages: - en: / - es: /es/ - features.md ``` * 📂 ⬜ 📁 📁 🇪🇸 👆 ✍, ✅: ``` docs/es/mkdocs.yml ``` * 🚮 ⚫️ 📤 ☑ 🎏 🗺 ⚫️ 🇪🇸, ✅: ```YAML hl_lines="8" site_name: FastAPI # More stuff nav: - FastAPI: index.md
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Tue Aug 06 04:48:30 UTC 2024 - 11.4K bytes - Viewed (0) -
docs/zh/docs/tutorial/security/first-steps.md
甚至可以说,它是适用于绝大多数用例的最佳方案,除非您是 OAuth2 的专家,知道为什么其它方案更合适。 本例中,**FastAPI** 还提供了构建工具。 /// 创建 `OAuth2PasswordBearer` 的类实例时,要传递 `tokenUrl` 参数。该参数包含客户端(用户浏览器中运行的前端) 的 URL,用于发送 `username` 与 `password`,并获取令牌。 ```Python hl_lines="6" {!../../docs_src/security/tutorial001.py!} ``` /// tip | "提示" 在此,`tokenUrl="token"` 指向的是暂未创建的相对 URL `token`。这个相对 URL 相当于 `./token`。
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Sun Oct 06 20:36:54 UTC 2024 - 7.3K bytes - Viewed (0) -
docs/ru/docs/tutorial/cors.md
* Учётных данных (включая заголовки Authorization, куки и т.п.). * Отдельных HTTP-методов (`POST`, `PUT`) или всех вместе, используя `"*"`. * Отдельных HTTP-заголовков или всех вместе, используя `"*"`. ```Python hl_lines="2 6-11 13-19" {!../../docs_src/cors/tutorial001.py!} ```
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Sun Oct 06 20:36:54 UTC 2024 - 8.3K bytes - Viewed (0) -
docs/de/docs/advanced/openapi-webhooks.md
Wenn Sie eine **FastAPI**-Anwendung erstellen, gibt es ein `webhooks`-Attribut, mit dem Sie *Webhooks* definieren können, genauso wie Sie *Pfadoperationen* definieren würden, zum Beispiel mit `@app.webhooks.post()`. ```Python hl_lines="9-13 36-53" {!../../docs_src/openapi_webhooks/tutorial001.py!} ``` Die von Ihnen definierten Webhooks landen im **OpenAPI**-Schema und der automatischen **Dokumentations-Oberfläche**. /// info
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Sun Oct 06 20:36:54 UTC 2024 - 3.3K bytes - Viewed (0) -
docs/fr/docs/async.md
```Python hl_lines="1" async def get_burgers(number: int): # Opérations asynchrones pour créer les burgers return burgers ``` ...et non `def` : ```Python hl_lines="2" # Ceci n'est pas asynchrone def get_sequential_burgers(number: int): # Opérations asynchrones pour créer les burgers
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Tue Aug 06 04:48:30 UTC 2024 - 25.4K bytes - Viewed (0) -
docs/zh/docs/advanced/additional-status-codes.md
例如,假设你想有一个 *路径操作* 能够更新条目,并且更新成功时返回 200 「成功」 的 HTTP 状态码。 但是你也希望它能够接受新的条目。并且当这些条目不存在时,会自动创建并返回 201 「创建」的 HTTP 状态码。 要实现它,导入 `JSONResponse`,然后在其中直接返回你的内容,并将 `status_code` 设置为为你要的值。 ```Python hl_lines="4 25" {!../../docs_src/additional_status_codes/tutorial001.py!} ``` /// warning | "警告" 当你直接返回一个像上面例子中的 `Response` 对象时,它会直接返回。 FastAPI 不会用模型等对该响应进行序列化。
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Sun Oct 06 20:36:54 UTC 2024 - 1.8K bytes - Viewed (0) -
okhttp/src/main/kotlin/okhttp3/Cache.kt
rawSource.use { val source = rawSource.buffer() val urlLine = source.readUtf8LineStrict() // Choice here is between failing with a correct RuntimeException // or mostly silently with an IOException url = urlLine.toHttpUrlOrNull() ?: throw IOException("Cache corruption for $urlLine").also { Platform.get().log("cache corruption", WARN, it) }
Registered: Fri Nov 01 11:42:11 UTC 2024 - Last Modified: Wed Apr 10 19:46:48 UTC 2024 - 26.8K bytes - Viewed (0) -
docs/pt/docs/how-to/graphql.md
Aqui está uma pequena prévia de como você poderia integrar Strawberry com FastAPI: ```Python hl_lines="3 22 25-26" {!../../docs_src/graphql/tutorial001.py!} ``` Você pode aprender mais sobre Strawberry na <a href="https://strawberry.rocks/" class="external-link" target="_blank">documentação do Strawberry</a>.
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Sun Oct 06 20:36:54 UTC 2024 - 3.5K bytes - Viewed (0)