- Sort Score
- Result 10 results
- Languages All
Results 291 - 300 of 513 for dictId (0.07 sec)
-
docs_src/extra_models/tutorial001.py
def fake_password_hasher(raw_password: str): return "supersecret" + raw_password def fake_save_user(user_in: UserIn): hashed_password = fake_password_hasher(user_in.password) user_in_db = UserInDB(**user_in.dict(), hashed_password=hashed_password) print("User saved! ..not really") return user_in_db @app.post("/user/", response_model=UserOut) async def create_user(user_in: UserIn):
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Sat May 14 11:59:59 UTC 2022 - 943 bytes - Viewed (0) -
tests/test_dependency_overrides.py
@app.get("/main-depends/") async def main_depends(commons: dict = Depends(common_parameters)): return {"in": "main-depends", "params": commons} @app.get("/decorator-depends/", dependencies=[Depends(common_parameters)]) async def decorator_depends(): return {"in": "decorator-depends"} @router.get("/router-depends/") async def router_depends(commons: dict = Depends(common_parameters)):
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Thu Apr 18 19:40:57 UTC 2024 - 15.4K bytes - Viewed (0) -
docs_src/python_types/tutorial008_py39.py
def process_items(prices: dict[str, float]): for item_name, item_price in prices.items(): print(item_name)
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Sun Jan 16 14:44:08 UTC 2022 - 145 bytes - Viewed (0) -
docs/en/docs/advanced/testing-dependencies.md
### Use the `app.dependency_overrides` attribute For these cases, your **FastAPI** application has an attribute `app.dependency_overrides`, it is a simple `dict`. To override a dependency for testing, you put as a key the original dependency (a function), and as the value, your dependency override (another function).
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Sun Oct 06 20:36:54 UTC 2024 - 2.9K bytes - Viewed (0) -
docs_src/dependencies/tutorial001_02_an_py310.py
from fastapi import Depends, FastAPI app = FastAPI() async def common_parameters(q: str | None = None, skip: int = 0, limit: int = 100): return {"q": q, "skip": skip, "limit": limit} CommonsDep = Annotated[dict, Depends(common_parameters)] @app.get("/items/") async def read_items(commons: CommonsDep): return commons @app.get("/users/") async def read_users(commons: CommonsDep):
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Sat Mar 18 12:29:59 UTC 2023 - 447 bytes - Viewed (0) -
docs/de/docs/how-to/custom-request-and-route.md
``` /// note | "Technische Details" Ein `Request` hat ein `request.scope`-Attribut, welches einfach ein Python-`dict` ist, welches die mit dem Request verbundenen Metadaten enthält. Ein `Request` hat auch ein `request.receive`, welches eine Funktion ist, die den Hauptteil des Requests empfängt. Das `scope`-`dict` und die `receive`-Funktion sind beide Teil der ASGI-Spezifikation.
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Sun Oct 06 20:36:54 UTC 2024 - 5.2K bytes - Viewed (0) -
docs/de/docs/advanced/testing-dependencies.md
### Verwenden Sie das Attribut `app.dependency_overrides`. 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.
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/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).
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Sun Oct 06 20:36:54 UTC 2024 - 3.2K bytes - Viewed (0) -
docs/pt/docs/tutorial/metadata.md
| `version` | `string` | A versão da API. Esta é a versão da sua aplicação, não do OpenAPI. Por exemplo, `2.5.0`. | | `terms_of_service` | `str` | Uma URL para os Termos de Serviço da API. Se fornecido, deve ser uma URL. |
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Tue Oct 29 10:36:14 UTC 2024 - 6.1K bytes - Viewed (0) -
docs_src/response_model/tutorial003_05_py310.py
from fastapi import FastAPI, Response from fastapi.responses import RedirectResponse app = FastAPI() @app.get("/portal", response_model=None) async def get_portal(teleport: bool = False) -> Response | dict: if teleport: return RedirectResponse(url="https://www.youtube.com/watch?v=dQw4w9WgXcQ")
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Tue Jan 10 16:22:47 UTC 2023 - 373 bytes - Viewed (0)