- Sort Score
- Result 10 results
- Languages All
Results 851 - 860 of 1,977 for Fastapi (0.08 sec)
-
docs_src/behind_a_proxy/tutorial001.py
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Thu Jun 11 21:53:19 UTC 2020 - 189 bytes - Viewed (0) -
docs_src/configure_swagger_ui/tutorial001.py
from fastapi import FastAPI app = FastAPI(swagger_ui_parameters={"syntaxHighlight": False}) @app.get("/users/{username}") async def read_user(username: str):
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Sat Aug 19 19:54:04 UTC 2023 - 205 bytes - Viewed (0) -
docs_src/header_params/tutorial001_py310.py
from fastapi import FastAPI, Header app = FastAPI() @app.get("/items/") async def read_items(user_agent: str | None = Header(default=None)):
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Fri May 13 23:38:22 UTC 2022 - 182 bytes - Viewed (0) -
docs/az/docs/learn/index.md
# Öyrən Burada **FastAPI** öyrənmək üçün giriş bölmələri və dərsliklər yer alır.
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Sat Mar 09 00:39:20 UTC 2024 - 212 bytes - Viewed (0) -
docs_src/query_params/tutorial005.py
from fastapi import FastAPI app = FastAPI() @app.get("/items/{item_id}") async def read_user_item(item_id: str, needy: str): item = {"item_id": item_id, "needy": needy}
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Thu Mar 26 19:09:53 UTC 2020 - 192 bytes - Viewed (0) -
docs_src/header_params/tutorial003_py310.py
from fastapi import FastAPI, Header app = FastAPI() @app.get("/items/") async def read_items(x_token: list[str] | None = Header(default=None)):
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Fri May 13 23:38:22 UTC 2022 - 186 bytes - Viewed (0) -
docs_src/query_params_str_validations/tutorial011_py310.py
from fastapi import FastAPI, Query app = FastAPI() @app.get("/items/") async def read_items(q: list[str] | None = Query(default=None)): query_items = {"q": q}
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Fri May 13 23:38:22 UTC 2022 - 189 bytes - Viewed (0) -
docs/de/docs/advanced/testing-dependencies.md
Für diese Fälle verfügt Ihre **FastAPI**-Anwendung über das Attribut `app.dependency_overrides`, bei diesem handelt sich um ein einfaches `dict`. Um eine Abhängigkeit für das Testen zu überschreiben, geben Sie als Schlüssel die ursprüngliche Abhängigkeit (eine Funktion) und als Wert Ihre Überschreibung der Abhängigkeit (eine andere Funktion) ein. Und dann ruft **FastAPI** diese Überschreibung anstelle der ursprünglichen Abhängigkeit auf.
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/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()` 调用等。
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/pt/docs/advanced/testing-dependencies.md
### Utilize o atributo `app.dependency_overrides` Para estes casos, a sua aplicação **FastAPI** possui o atributo `app.dependency_overrides`. Ele é um simples `dict`. Para sobrepor a dependência para os testes, você coloca como chave a dependência original (a função), e como valor, a sua sobreposição da dependência (outra função). E então o **FastAPI** chamará a sobreposição no lugar da dependência original. //// tab | Python 3.10+
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Sun Oct 06 20:36:54 UTC 2024 - 3.2K bytes - Viewed (0)