- Sort Score
- Result 10 results
- Languages All
Results 1171 - 1180 of 1,962 for fastapi (0.06 sec)
-
tests/test_enforce_once_required_parameter.py
from typing import Optional from fastapi import Depends, FastAPI, Query, status from fastapi.testclient import TestClient app = FastAPI() def _get_client_key(client_id: str = Query(...)) -> str: return f"{client_id}_key" def _get_client_tag(client_id: Optional[str] = Query(None)) -> Optional[str]: if client_id is None: return None return f"{client_id}_tag" @app.get("/foo") def foo_handler(
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Fri Jun 30 18:25:16 UTC 2023 - 3.4K bytes - Viewed (0) -
docs/de/docs/async.md
Wenn Sie mit **FastAPI** arbeiten, müssen Sie sich darüber keine Sorgen machen, da diese „erste“ Funktion Ihre *Pfadoperation-Funktion* sein wird und FastAPI weiß, was zu tun ist. Wenn Sie jedoch `async` / `await` ohne FastAPI verwenden möchten, können Sie dies auch tun. ### Schreiben Sie Ihren eigenen asynchronen Code
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Tue Aug 06 04:48:30 UTC 2024 - 26.6K bytes - Viewed (0) -
docs/tr/docs/tutorial/request-forms.md
Örneğin `pip install python-multipart`. /// ## `Form` Sınıfını Projenize Dahil Edin `Form` sınıfını `fastapi`'den projenize dahil edin: //// tab | Python 3.9+ ```Python hl_lines="3" {!> ../../docs_src/request_forms/tutorial001_an_py39.py!} ``` //// //// tab | Python 3.8+ ```Python hl_lines="1"
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Sun Oct 06 20:36:54 UTC 2024 - 3.8K bytes - Viewed (0) -
docs/en/docs/tutorial/header-param-models.md
This would allow you to **re-use the model** in **multiple places** and also to declare validations and metadata for all the parameters at once. 😎 /// note This is supported since FastAPI version `0.115.0`. 🤓 /// ## Header Parameters with a Pydantic Model Declare the **header parameters** that you need in a **Pydantic model**, and then declare the parameter as `Header`: //// tab | Python 3.10+
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Sun Oct 06 20:36:54 UTC 2024 - 3.5K bytes - Viewed (0) -
docs_src/body_updates/tutorial001_py39.py
from typing import Union from fastapi import FastAPI from fastapi.encoders import jsonable_encoder from pydantic import BaseModel app = FastAPI() class Item(BaseModel): name: Union[str, None] = None description: Union[str, None] = None price: Union[float, None] = None tax: float = 10.5 tags: list[str] = [] items = { "foo": {"name": "Foo", "price": 50.2},
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Sat May 14 11:59:59 UTC 2022 - 900 bytes - Viewed (0) -
docs/em/docs/advanced/custom-response.md
⭕ 📨, 📨 `Response` 🔗 🌅 ⏩ 🌘 🛬 📖. 👉 ↩️ 🔢, FastAPI 🔜 ✔ 🔠 🏬 🔘 & ⚒ 💭 ⚫️ 🎻 ⏮️ 🎻, ⚙️ 🎏 [🎻 🔗 🔢](../tutorial/encoder.md){.internal-link target=_blank} 🔬 🔰. 👉 ⚫️❔ ✔ 👆 📨 **❌ 🎚**, 🖼 💽 🏷. ✋️ 🚥 👆 🎯 👈 🎚 👈 👆 🛬 **🎻 ⏮️ 🎻**, 👆 💪 🚶♀️ ⚫️ 🔗 📨 🎓 & ❎ ➕ 🌥 👈 FastAPI 🔜 ✔️ 🚶♀️ 👆 📨 🎚 🔘 `jsonable_encoder` ⏭ 🚶♀️ ⚫️ 📨 🎓. ```Python hl_lines="2 7" {!../../docs_src/custom_response/tutorial001b.py!}
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Sun Oct 06 20:36:54 UTC 2024 - 9.7K bytes - Viewed (0) -
docs/en/docs/advanced/response-directly.md
**FastAPI** provides the same `starlette.responses` as `fastapi.responses` just as a convenience for you, the developer. But most of the available responses come directly from Starlette. /// ## Returning a custom `Response`
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Sun Oct 06 20:36:54 UTC 2024 - 3K bytes - Viewed (0) -
docs_src/security/tutorial005_py310.py
from datetime import datetime, timedelta, timezone import jwt from fastapi import Depends, FastAPI, HTTPException, Security, status from fastapi.security import ( OAuth2PasswordBearer, OAuth2PasswordRequestForm, SecurityScopes, ) from jwt.exceptions import InvalidTokenError from passlib.context import CryptContext from pydantic import BaseModel, ValidationError # to get a string like this run: # openssl rand -hex 32
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Mon May 20 17:37:28 UTC 2024 - 5.1K bytes - Viewed (0) -
docs/zh/docs/tutorial/security/simple-oauth2.md
* 可选的 `client_id`(本例未使用) * 可选的 `client_secret`(本例未使用) /// info | "说明" `OAuth2PasswordRequestForm` 与 `OAuth2PasswordBearer` 一样,都不是 FastAPI 的特殊类。 **FastAPI** 把 `OAuth2PasswordBearer` 识别为安全方案。因此,可以通过这种方式把它添加至 OpenAPI。 但 `OAuth2PasswordRequestForm` 只是可以自行编写的类依赖项,也可以直接声明 `Form` 参数。 但由于这种用例很常见,FastAPI 为了简便,就直接提供了对它的支持。 /// ### 使用表单数据 /// tip | "提示"
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Sun Oct 06 20:36:54 UTC 2024 - 8.8K bytes - Viewed (0) -
docs/zh/docs/features.md
* 用于生产应用。 ## Starlette 特性 **FastAPI** 和 <a href="https://www.starlette.io/" class="external-link" target="_blank"><strong>Starlette</strong></a> 完全兼容(并基于)。所以,你有的其他的 Starlette 代码也能正常工作。`FastAPI` 实际上是 `Starlette`的一个子类。所以,如果你已经知道或者使用 Starlette,大部分的功能会以相同的方式工作。 通过 **FastAPI** 你可以获得所有 **Starlette** 的特性 ( FastAPI 就像加强版的 Starlette ):
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Tue Aug 06 04:48:30 UTC 2024 - 8.9K bytes - Viewed (0)