- Sort Score
- Result 10 results
- Languages All
Results 141 - 150 of 1,992 for Fastapi (0.05 sec)
-
docs/pt/docs/deployment/fastapicloud.md
# FastAPI Cloud { #fastapi-cloud } Você pode implantar sua aplicação FastAPI no <a href="https://fastapicloud.com" class="external-link" target="_blank">FastAPI Cloud</a> com um **único comando**; entre na lista de espera, caso ainda não tenha feito isso. 🚀 ## Login { #login } Certifique-se de que você já tem uma conta no **FastAPI Cloud** (nós convidamos você a partir da lista de espera 😉). Depois, faça login: <div class="termy"> ```consoleRegistered: Sun Dec 28 07:19:09 UTC 2025 - Last Modified: Wed Dec 17 19:59:04 UTC 2025 - 2.3K bytes - Viewed (0) -
tests/test_param_class.py
from typing import Optional from fastapi import FastAPI from fastapi.params import Param from fastapi.testclient import TestClient app = FastAPI() @app.get("/items/") def read_items(q: Optional[str] = Param(default=None)): # type: ignore return {"q": q} client = TestClient(app) def test_default_param_query_none(): response = client.get("/items/") assert response.status_code == 200, response.text
Registered: Sun Dec 28 07:19:09 UTC 2025 - Last Modified: Fri May 13 23:38:22 UTC 2022 - 636 bytes - Viewed (0) -
fastapi/security/api_key.py
The dependency result will be a string containing the key value. ## Example ```python from fastapi import Depends, FastAPI from fastapi.security import APIKeyQuery app = FastAPI() query_scheme = APIKeyQuery(name="api_key") @app.get("/items/") async def read_items(api_key: str = Depends(query_scheme)):Registered: Sun Dec 28 07:19:09 UTC 2025 - Last Modified: Wed Dec 17 21:25:59 UTC 2025 - 9.6K bytes - Viewed (1) -
tests/test_additional_responses_custom_validationerror.py
from fastapi import FastAPI from fastapi.responses import JSONResponse from fastapi.testclient import TestClient from pydantic import BaseModel app = FastAPI() class JsonApiResponse(JSONResponse): media_type = "application/vnd.api+json" class Error(BaseModel): status: str title: str class JsonApiError(BaseModel): errors: list[Error] @app.get( "/a/{id}",
Registered: Sun Dec 28 07:19:09 UTC 2025 - Last Modified: Wed Dec 17 21:25:59 UTC 2025 - 2.9K bytes - Viewed (0) -
tests/test_security_api_key_header_optional.py
from typing import Optional from fastapi import Depends, FastAPI, Security from fastapi.security import APIKeyHeader from fastapi.testclient import TestClient from pydantic import BaseModel app = FastAPI() api_key = APIKeyHeader(name="key", auto_error=False) class User(BaseModel): username: str def get_current_user(oauth_header: Optional[str] = Security(api_key)): if oauth_header is None: return None
Registered: Sun Dec 28 07:19:09 UTC 2025 - Last Modified: Fri Jun 30 18:25:16 UTC 2023 - 2K bytes - Viewed (0) -
tests/test_security_http_digest_optional.py
from typing import Optional from fastapi import FastAPI, Security from fastapi.security import HTTPAuthorizationCredentials, HTTPDigest from fastapi.testclient import TestClient app = FastAPI() security = HTTPDigest(auto_error=False) @app.get("/users/me") def read_current_user( credentials: Optional[HTTPAuthorizationCredentials] = Security(security), ): if credentials is None:
Registered: Sun Dec 28 07:19:09 UTC 2025 - Last Modified: Thu Feb 27 12:29:20 UTC 2025 - 2.2K bytes - Viewed (0) -
tests/test_router_prefix_with_template.py
from fastapi import APIRouter, FastAPI from fastapi.testclient import TestClient app = FastAPI() router = APIRouter() @router.get("/users/{id}") def read_user(segment: str, id: str): return {"segment": segment, "id": id} app.include_router(router, prefix="/{segment}") client = TestClient(app) def test_get(): response = client.get("/seg/users/foo")
Registered: Sun Dec 28 07:19:09 UTC 2025 - Last Modified: Wed Apr 08 04:37:38 UTC 2020 - 484 bytes - Viewed (0) -
docs/zh/docs/tutorial/handling-errors.md
"size": "XL" } } ``` ### FastAPI `HTTPException` vs Starlette `HTTPException` **FastAPI** 也提供了自有的 `HTTPException`。 **FastAPI** 的 `HTTPException` 继承自 Starlette 的 `HTTPException` 错误类。 它们之间的唯一区别是,**FastAPI** 的 `HTTPException` 可以在响应中添加响应头。 OAuth 2.0 等安全工具需要在内部调用这些响应头。 因此你可以继续像平常一样在代码中触发 **FastAPI** 的 `HTTPException` 。 但注册异常处理器时,应该注册到来自 Starlette 的 `HTTPException`。
Registered: Sun Dec 28 07:19:09 UTC 2025 - Last Modified: Sat Oct 11 17:48:49 UTC 2025 - 8.2K bytes - Viewed (0) -
docs/es/docs/tutorial/body-multiple-params.md
Por ejemplo, ampliando el modelo anterior, podrías decidir que deseas tener otra clave `importance` en el mismo cuerpo, además de `item` y `user`. Si lo declaras tal cual, debido a que es un valor singular, **FastAPI** asumirá que es un parámetro de query. Pero puedes instruir a **FastAPI** para que lo trate como otra clave del cuerpo usando `Body`:
Registered: Sun Dec 28 07:19:09 UTC 2025 - Last Modified: Tue Dec 16 16:33:45 UTC 2025 - 5.2K bytes - Viewed (0) -
tests/test_custom_route_class.py
import pytest from fastapi import APIRouter, FastAPI from fastapi.routing import APIRoute from fastapi.testclient import TestClient from starlette.routing import Route app = FastAPI() class APIRouteA(APIRoute): x_type = "A" class APIRouteB(APIRoute): x_type = "B" class APIRouteC(APIRoute): x_type = "C" router_a = APIRouter(route_class=APIRouteA) router_b = APIRouter(route_class=APIRouteB)
Registered: Sun Dec 28 07:19:09 UTC 2025 - Last Modified: Fri Jun 30 18:25:16 UTC 2023 - 3.1K bytes - Viewed (0)