- Sort Score
- Num 10 results
- Language All
Results 7531 - 7540 of 7,804 for RETURN (0.07 seconds)
-
docs_src/behind_a_proxy/tutorial004_py310.py
{"url": "https://prod.example.com", "description": "Production environment"}, ], root_path="/api/v1", root_path_in_servers=False, ) @app.get("/app") def read_main(request: Request):Created: Sun Apr 05 07:19:11 GMT 2026 - Last Modified: Thu Feb 12 13:19:43 GMT 2026 - 437 bytes - Click Count (0) -
docs/pt/docs/advanced/response-directly.md
# Retornando uma Resposta Diretamente { #return-a-response-directly } Quando você cria uma *operação de rota* no **FastAPI**, normalmente você pode retornar qualquer dado: um `dict`, uma `list`, um modelo do Pydantic, um modelo do banco de dados, etc. Se você declarar um [Modelo de resposta](../tutorial/response-model.md), o FastAPI irá usá-lo para serializar os dados para JSON, usando o Pydantic.Created: Sun Apr 05 07:19:11 GMT 2026 - Last Modified: Thu Mar 19 18:20:43 GMT 2026 - 4.5K bytes - Click Count (0) -
docs/ru/docs/tutorial/stream-json-lines.md
/// ## Стриминг JSON Lines с FastAPI { #stream-json-lines-with-fastapi } Чтобы стримить JSON Lines с FastAPI, вместо использования `return` в вашей *функции-обработчике пути* используйте `yield`, чтобы по очереди выдавать каждый элемент. {* ../../docs_src/stream_json_lines/tutorial001_py310.py ln[1:24] hl[24] *}Created: Sun Apr 05 07:19:11 GMT 2026 - Last Modified: Thu Mar 19 17:56:20 GMT 2026 - 7.1K bytes - Click Count (0) -
docs/uk/docs/tutorial/stream-json-lines.md
/// ## Стрімінг JSON Lines з FastAPI { #stream-json-lines-with-fastapi } Щоб стрімити JSON Lines з FastAPI, замість використання `return` у вашій *функції операції шляху* використовуйте `yield`, щоб по черзі створювати кожен елемент. {* ../../docs_src/stream_json_lines/tutorial001_py310.py ln[1:24] hl[24] *}Created: Sun Apr 05 07:19:11 GMT 2026 - Last Modified: Thu Mar 19 18:25:54 GMT 2026 - 6.6K bytes - Click Count (0) -
docs_src/query_params_str_validations/tutorial005_py310.py
@app.get("/items/") async def read_items(q: str = Query(default="fixedquery", min_length=3)): results = {"items": [{"item_id": "Foo"}, {"item_id": "Bar"}]} if q: results.update({"q": q})
Created: Sun Apr 05 07:19:11 GMT 2026 - Last Modified: Thu Feb 12 13:19:43 GMT 2026 - 276 bytes - Click Count (0) -
docs_src/pydantic_v1_in_v2/tutorial003_an_py310.py
class ItemV2(BaseModelV2): name: str description: str | None = None size: float app = FastAPI() @app.post("/items/", response_model=ItemV2) async def create_item(item: Item):
Created: Sun Apr 05 07:19:11 GMT 2026 - Last Modified: Sat Oct 11 16:45:54 GMT 2025 - 407 bytes - Click Count (0) -
docs_src/behind_a_proxy/tutorial003_py310.py
{"url": "https://prod.example.com", "description": "Production environment"}, ], root_path="/api/v1", ) @app.get("/app") def read_main(request: Request):Created: Sun Apr 05 07:19:11 GMT 2026 - Last Modified: Thu Feb 12 13:19:43 GMT 2026 - 405 bytes - Click Count (0) -
tests/test_callable_endpoint.py
from functools import partial from fastapi import FastAPI from fastapi.testclient import TestClient def main(some_arg, q: str | None = None): return {"some_arg": some_arg, "q": q} endpoint = partial(main, "foo") app = FastAPI() app.get("/")(endpoint) client = TestClient(app) def test_partial(): response = client.get("/?q=bar") data = response.json()
Created: Sun Apr 05 07:19:11 GMT 2026 - Last Modified: Tue Feb 17 09:59:14 GMT 2026 - 426 bytes - Click Count (0) -
docs/fr/docs/tutorial/dependencies/sub-dependencies.md
return {"fresh_value": fresh_value} ``` //// //// tab | Python 3.10+ non annoté /// tip | Astuce Privilégiez la version `Annotated` si possible. /// ```Python hl_lines="1" async def needy_dependency(fresh_value: str = Depends(get_value, use_cache=False)): return {"fresh_value": fresh_value} ``` ////Created: Sun Apr 05 07:19:11 GMT 2026 - Last Modified: Sat Feb 14 08:12:41 GMT 2026 - 4.2K bytes - Click Count (0) -
docs/pt/docs/tutorial/dependencies/sub-dependencies.md
return {"fresh_value": fresh_value} ``` //// //// tab | Python 3.10+ non-Annotated /// tip | Dica Utilize a versão com `Annotated` se possível. /// ```Python hl_lines="1" async def needy_dependency(fresh_value: str = Depends(get_value, use_cache=False)): return {"fresh_value": fresh_value} ``` ////Created: Sun Apr 05 07:19:11 GMT 2026 - Last Modified: Fri Feb 13 13:48:53 GMT 2026 - 4.1K bytes - Click Count (0)