- Sort Score
- Result 10 results
- Languages All
Results 1131 - 1140 of 1,916 for FastApi (0.29 sec)
-
tests/test_tutorial/test_path_params/test_tutorial003.py
import pytest from fastapi.testclient import TestClient from docs_src.path_params.tutorial003_py39 import app client = TestClient(app) @pytest.mark.parametrize( ("user_id", "expected_response"), [ ("me", {"user_id": "the current user"}), ("alice", {"user_id": "alice"}), ], ) def test_get_users(user_id: str, expected_response: dict): response = client.get(f"/users/{user_id}")
Registered: Sun Dec 28 07:19:09 UTC 2025 - Last Modified: Fri Dec 26 10:43:02 UTC 2025 - 4.6K bytes - Viewed (0) -
tests/test_tutorial/test_query_params/test_tutorial005.py
from fastapi.testclient import TestClient from docs_src.query_params.tutorial005_py39 import app client = TestClient(app) def test_foo_needy_very(): response = client.get("/items/foo?needy=very") assert response.status_code == 200 assert response.json() == {"item_id": "foo", "needy": "very"} def test_foo_no_needy(): response = client.get("/items/foo") assert response.status_code == 422
Registered: Sun Dec 28 07:19:09 UTC 2025 - Last Modified: Sat Dec 27 18:19:10 UTC 2025 - 3.6K bytes - Viewed (0) -
tests/test_tutorial/test_query_params_str_validations/test_tutorial014.py
import importlib import pytest from fastapi.testclient import TestClient from ...utils import needs_py310 @pytest.fixture( name="client", params=[ pytest.param("tutorial014_py39"), pytest.param("tutorial014_py310", marks=needs_py310), pytest.param("tutorial014_an_py39"), pytest.param("tutorial014_an_py310", marks=needs_py310), ], ) def get_client(request: pytest.FixtureRequest):
Registered: Sun Dec 28 07:19:09 UTC 2025 - Last Modified: Wed Dec 17 20:41:43 UTC 2025 - 3.4K bytes - Viewed (0) -
docs/pt/docs/tutorial/security/simple-oauth2.md
* Um `client_secret` opcional (não precisamos dele em nosso exemplo). /// info | Informação O `OAuth2PasswordRequestForm` não é uma classe especial para **FastAPI** como é `OAuth2PasswordBearer`. `OAuth2PasswordBearer` faz com que **FastAPI** saiba que é um esquema de segurança. Portanto, é adicionado dessa forma ao OpenAPI.
Registered: Sun Dec 28 07:19:09 UTC 2025 - Last Modified: Wed Nov 12 16:23:57 UTC 2025 - 10.3K bytes - Viewed (0) -
docs_src/custom_docs_ui/tutorial002_py39.py
from fastapi import FastAPI from fastapi.openapi.docs import ( get_redoc_html, get_swagger_ui_html, get_swagger_ui_oauth2_redirect_html, ) from fastapi.staticfiles import StaticFiles app = FastAPI(docs_url=None, redoc_url=None) app.mount("/static", StaticFiles(directory="static"), name="static") @app.get("/docs", include_in_schema=False) async def custom_swagger_ui_html(): return get_swagger_ui_html(
Registered: Sun Dec 28 07:19:09 UTC 2025 - Last Modified: Wed Dec 17 20:41:43 UTC 2025 - 1.1K bytes - Viewed (0) -
tests/test_security_scopes.py
from typing import Annotated import pytest from fastapi import Depends, FastAPI, Security from fastapi.testclient import TestClient @pytest.fixture(name="call_counter") def call_counter_fixture(): return {"count": 0} @pytest.fixture(name="app") def app_fixture(call_counter: dict[str, int]): def get_db(): call_counter["count"] += 1 return f"db_{call_counter['count']}"
Registered: Sun Dec 28 07:19:09 UTC 2025 - Last Modified: Wed Dec 17 21:25:59 UTC 2025 - 1006 bytes - Viewed (0) -
docs/es/docs/async.md
Si estás trabajando con **FastAPI** no tienes que preocuparte por eso, porque esa "primera" función será tu *path operation function*, y FastAPI sabrá cómo hacer lo correcto. Pero si deseas usar `async` / `await` sin FastAPI, también puedes hacerlo. ### Escribe tu propio código async { #write-your-own-async-code }
Registered: Sun Dec 28 07:19:09 UTC 2025 - Last Modified: Wed Dec 17 10:15:01 UTC 2025 - 25.4K bytes - Viewed (0) -
docs/ru/docs/deployment/index.md
Например, мы, команда, стоящая за FastAPI, создали <a href="https://fastapicloud.com" class="external-link" target="_blank">**FastAPI Cloud**</a>, чтобы сделать развёртывание приложений FastAPI в облаке как можно более простым и прямолинейным, с тем же удобством для разработчика, что и при работе с FastAPI.
Registered: Sun Dec 28 07:19:09 UTC 2025 - Last Modified: Thu Dec 11 21:25:03 UTC 2025 - 2.8K bytes - Viewed (0) -
tests/test_security_http_basic_realm_description.py
from base64 import b64encode from fastapi import FastAPI, Security from fastapi.security import HTTPBasic, HTTPBasicCredentials from fastapi.testclient import TestClient app = FastAPI() security = HTTPBasic(realm="simple", description="HTTPBasic scheme") @app.get("/users/me") def read_current_user(credentials: HTTPBasicCredentials = Security(security)): return {"username": credentials.username, "password": credentials.password}
Registered: Sun Dec 28 07:19:09 UTC 2025 - Last Modified: Mon Nov 24 19:03:06 UTC 2025 - 2.7K bytes - Viewed (0) -
tests/test_extra_routes.py
from typing import Optional from fastapi import FastAPI from fastapi.responses import JSONResponse from fastapi.testclient import TestClient from pydantic import BaseModel app = FastAPI() class Item(BaseModel): name: str price: Optional[float] = None @app.api_route("/items/{item_id}", methods=["GET"]) def get_items(item_id: str): return {"item_id": item_id} def get_not_decorated(item_id: str):
Registered: Sun Dec 28 07:19:09 UTC 2025 - Last Modified: Sat Dec 27 18:19:10 UTC 2025 - 13.5K bytes - Viewed (0)