- Sort Score
- Result 10 results
- Languages All
Results 61 - 70 of 166 for rica (0.03 sec)
-
docs_src/dependencies/tutorial008d_an_py39.py
from typing import Annotated from fastapi import Depends, FastAPI, HTTPException app = FastAPI() class InternalError(Exception): pass def get_username(): try: yield "Rick" except InternalError: print("We don't swallow the internal error here, we raise again đ") raise @app.get("/items/{item_id}") def get_item(item_id: str, username: Annotated[str, Depends(get_username)]):
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Sat Feb 24 23:06:37 UTC 2024 - 734 bytes - Viewed (0) -
docs_src/dependencies/tutorial012_an_py39.py
@app.get("/items/") async def read_items(): return [{"item": "Portal Gun"}, {"item": "Plumbus"}] @app.get("/users/") async def read_users():
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Sat Mar 18 12:29:59 UTC 2023 - 756 bytes - Viewed (0) -
docs_src/dependencies/tutorial008c.py
from fastapi import Depends, FastAPI, HTTPException app = FastAPI() class InternalError(Exception): pass def get_username(): try: yield "Rick" except InternalError: print("Oops, we didn't raise again, Britney đ±") @app.get("/items/{item_id}") def get_item(item_id: str, username: str = Depends(get_username)): if item_id == "portal-gun": raise InternalError(
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Sat Feb 24 23:06:37 UTC 2024 - 660 bytes - Viewed (0) -
docs_src/dependencies/tutorial008c_an_py39.py
from typing import Annotated from fastapi import Depends, FastAPI, HTTPException app = FastAPI() class InternalError(Exception): pass def get_username(): try: yield "Rick" except InternalError: print("Oops, we didn't raise again, Britney đ±") @app.get("/items/{item_id}") def get_item(item_id: str, username: Annotated[str, Depends(get_username)]): if item_id == "portal-gun":
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Sat Feb 24 23:06:37 UTC 2024 - 700 bytes - Viewed (0) -
docs_src/dependencies/tutorial008c_an.py
from fastapi import Depends, FastAPI, HTTPException from typing_extensions import Annotated app = FastAPI() class InternalError(Exception): pass def get_username(): try: yield "Rick" except InternalError: print("Oops, we didn't raise again, Britney đ±") @app.get("/items/{item_id}") def get_item(item_id: str, username: Annotated[str, Depends(get_username)]): if item_id == "portal-gun":
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Sat Feb 24 23:06:37 UTC 2024 - 710 bytes - Viewed (0) -
docs_src/dependencies/tutorial012.py
@app.get("/items/") async def read_items(): return [{"item": "Portal Gun"}, {"item": "Plumbus"}] @app.get("/users/") async def read_users():
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Fri May 13 23:38:22 UTC 2022 - 696 bytes - Viewed (0) -
docs/pt/docs/advanced/security/index.md
## Funcionalidades Adicionais Existem algumas funcionalidades adicionais para lidar com segurança alĂ©m das cobertas em [Tutorial - Guia de UsuĂĄrio: Segurança](../../tutorial/security/index.md){.internal-link target=_blank}. /// tip | "Dica" As prĂłximas seçÔes **nĂŁo sĂŁo necessariamente "avançadas"**. E Ă© possĂvel que para o seu caso de uso, a solução estĂĄ em uma delas. /// ## Leia o Tutorial primeiro
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Tue Sep 03 13:43:56 UTC 2024 - 713 bytes - Viewed (0) -
tests/test_tutorial/test_path_operation_configurations/test_tutorial002b.py
assert response.json() == ["Portal gun", "Plumbus"] def test_get_users(): response = client.get("/users/") assert response.status_code == 200, response.text assert response.json() == ["Rick", "Morty"] def test_openapi_schema(): response = client.get("/openapi.json") assert response.status_code == 200, response.text assert response.json() == { "openapi": "3.1.0",
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Fri Jun 30 18:25:16 UTC 2023 - 1.7K bytes - Viewed (0) -
docs/pt/docs/advanced/websockets.md
LĂĄ vocĂȘ pode definir: * O "Item ID", usado na rota. * O "Token" usado como um parĂąmetro de consulta. /// tip | Dica Perceba que a consulta `token` serĂĄ manipulada por uma dependĂȘncia. /// Com isso vocĂȘ pode conectar o WebSocket e entĂŁo enviar e receber mensagens: <img src="/img/tutorial/websockets/image05.png">
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Thu Oct 31 12:20:59 UTC 2024 - 5.7K bytes - Viewed (0) -
docs/pt/docs/deployment/versions.md
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Tue Aug 06 04:48:30 UTC 2024 - 3.8K bytes - Viewed (0)