- Sort Score
- Num 10 results
- Language All
Results 461 - 470 of 795 for asyncId (0.05 seconds)
-
tests/test_optional_file_list.py
from fastapi import FastAPI, File from fastapi.testclient import TestClient app = FastAPI() @app.post("/files") async def upload_files(files: list[bytes] | None = File(None)): if files is None: return {"files_count": 0} return {"files_count": len(files), "sizes": [len(f) for f in files]} def test_optional_bytes_list(): client = TestClient(app) response = client.post( "/files",
Created: Sun Apr 05 07:19:11 GMT 2026 - Last Modified: Tue Feb 17 09:59:14 GMT 2026 - 789 bytes - Click Count (0) -
docs_src/query_params_str_validations/tutorial007_an_py310.py
Created: Sun Apr 05 07:19:11 GMT 2026 - Last Modified: Tue Mar 26 16:56:53 GMT 2024 - 337 bytes - Click Count (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")
Created: Sun Apr 05 07:19:11 GMT 2026 - Last Modified: Tue Jan 10 16:22:47 GMT 2023 - 373 bytes - Click Count (0) -
docs_src/generate_clients/tutorial004.js
import * as fs from 'fs' async function modifyOpenAPIFile(filePath) { try { const data = await fs.promises.readFile(filePath) const openapiContent = JSON.parse(data) const paths = openapiContent.paths for (const pathKey of Object.keys(paths)) { const pathData = paths[pathKey] for (const method of Object.keys(pathData)) { const operation = pathData[method] if (operation.tags && operation.tags.length > 0) {
Created: Sun Apr 05 07:19:11 GMT 2026 - Last Modified: Thu Mar 14 11:40:05 GMT 2024 - 1K bytes - Click Count (0) -
docs_src/body_nested_models/tutorial006_py310.py
Created: Sun Apr 05 07:19:11 GMT 2026 - Last Modified: Fri Jan 07 14:11:31 GMT 2022 - 475 bytes - Click Count (0) -
docs_src/dataclasses_/tutorial002_py310.py
price: float tags: list[str] = field(default_factory=list) description: str | None = None tax: float | None = None app = FastAPI() @app.get("/items/next", response_model=Item) async def read_next_item(): return { "name": "Island In The Moon", "price": 12.99, "description": "A place to be playin' and havin' fun", "tags": ["breater"],Created: Sun Apr 05 07:19:11 GMT 2026 - Last Modified: Fri Dec 26 10:43:02 GMT 2025 - 506 bytes - Click Count (0) -
docs_src/path_params_numeric_validations/tutorial004_an_py310.py
Created: Sun Apr 05 07:19:11 GMT 2026 - Last Modified: Thu Feb 12 13:19:43 GMT 2026 - 317 bytes - Click Count (0) -
tests/test_no_swagger_ui_redirect.py
from fastapi import FastAPI from fastapi.testclient import TestClient app = FastAPI(swagger_ui_oauth2_redirect_url=None) @app.get("/items/") async def read_items(): return {"id": "foo"} client = TestClient(app) def test_swagger_ui(): response = client.get("/docs") assert response.status_code == 200, response.text assert response.headers["content-type"] == "text/html; charset=utf-8"
Created: Sun Apr 05 07:19:11 GMT 2026 - Last Modified: Wed Apr 08 04:37:38 GMT 2020 - 786 bytes - Click Count (0) -
docs_src/path_operation_configuration/tutorial005_py310.py
price: float tax: float | None = None tags: set[str] = set() @app.post( "/items/", summary="Create an item", response_description="The created item", ) async def create_item(item: Item) -> Item: """ Create an item with all the information: - **name**: each item must have a name - **description**: a long description - **price**: requiredCreated: Sun Apr 05 07:19:11 GMT 2026 - Last Modified: Wed Feb 04 12:07:26 GMT 2026 - 681 bytes - Click Count (0) -
docs/pt/docs/tutorial/server-sent-events.md
/// ### *Funções de operação de rota* não assíncronas { #non-async-path-operation-functions } Você também pode usar funções `def` normais (sem `async`) e usar `yield` da mesma forma. O FastAPI garantirá a execução correta para não bloquear o event loop.Created: Sun Apr 05 07:19:11 GMT 2026 - Last Modified: Thu Mar 19 18:20:13 GMT 2026 - 4.9K bytes - Click Count (0)