- Sort Score
- Num 10 results
- Language All
Results 1 - 10 of 17 for FileResponse (0.05 seconds)
-
docs_src/custom_response/tutorial009b_py39.py
Created: Sun Dec 28 07:19:09 GMT 2025 - Last Modified: Wed Dec 17 20:41:43 GMT 2025 - 217 bytes - Click Count (0) -
docs_src/additional_responses/tutorial002_py310.py
from fastapi import FastAPI from fastapi.responses import FileResponse from pydantic import BaseModel class Item(BaseModel): id: str value: str app = FastAPI() @app.get( "/items/{item_id}", response_model=Item, responses={ 200: { "content": {"image/png": {}}, "description": "Return the JSON item or an image.", } }, )
Created: Sun Dec 28 07:19:09 GMT 2025 - Last Modified: Wed Dec 10 08:55:32 GMT 2025 - 596 bytes - Click Count (0) -
docs_src/additional_responses/tutorial004_py310.py
from fastapi import FastAPI from fastapi.responses import FileResponse from pydantic import BaseModel class Item(BaseModel): id: str value: str responses = { 404: {"description": "Item not found"}, 302: {"description": "The item was moved"}, 403: {"description": "Not enough privileges"}, } app = FastAPI() @app.get( "/items/{item_id}", response_model=Item,
Created: Sun Dec 28 07:19:09 GMT 2025 - Last Modified: Wed Dec 10 08:55:32 GMT 2025 - 669 bytes - Click Count (0) -
docs_src/custom_response/tutorial009_py39.py
Created: Sun Dec 28 07:19:09 GMT 2025 - Last Modified: Wed Dec 17 20:41:43 GMT 2025 - 202 bytes - Click Count (0) -
docs_src/additional_responses/tutorial002_py39.py
from typing import Union from fastapi import FastAPI from fastapi.responses import FileResponse from pydantic import BaseModel class Item(BaseModel): id: str value: str app = FastAPI() @app.get( "/items/{item_id}", response_model=Item, responses={ 200: { "content": {"image/png": {}}, "description": "Return the JSON item or an image.", } },
Created: Sun Dec 28 07:19:09 GMT 2025 - Last Modified: Wed Dec 17 20:41:43 GMT 2025 - 628 bytes - Click Count (0) -
docs_src/additional_responses/tutorial004_py39.py
from typing import Union from fastapi import FastAPI from fastapi.responses import FileResponse from pydantic import BaseModel class Item(BaseModel): id: str value: str responses = { 404: {"description": "Item not found"}, 302: {"description": "The item was moved"}, 403: {"description": "Not enough privileges"}, } app = FastAPI() @app.get( "/items/{item_id}",
Created: Sun Dec 28 07:19:09 GMT 2025 - Last Modified: Wed Dec 17 20:41:43 GMT 2025 - 701 bytes - Click Count (0) -
docs/en/docs/advanced/custom-response.md
/// tip Notice that here as we are using standard `open()` that doesn't support `async` and `await`, we declare the path operation with normal `def`. /// ### `FileResponse` { #fileresponse } Asynchronously streams a file as the response. Takes a different set of arguments to instantiate than the other response types: * `path` - The file path to the file to stream.
Created: Sun Dec 28 07:19:09 GMT 2025 - Last Modified: Wed Dec 17 20:41:43 GMT 2025 - 12.4K bytes - Click Count (0) -
docs/de/docs/advanced/custom-response.md
/// tip | Tipp Beachten Sie, dass wir, da wir Standard-`open()` verwenden, welches `async` und `await` nicht unterstützt, hier die Pfadoperation mit normalen `def` deklarieren. /// ### `FileResponse` { #fileresponse } Streamt eine Datei asynchron als Response. Nimmt zur Instanziierung einen anderen Satz von Argumenten entgegen als die anderen Response-Typen:Created: Sun Dec 28 07:19:09 GMT 2025 - Last Modified: Wed Dec 17 20:41:43 GMT 2025 - 14.4K bytes - Click Count (0) -
docs/es/docs/advanced/custom-response.md
/// tip | Consejo Nota que aquí como estamos usando `open()` estándar que no admite `async` y `await`, declaramos el path operation con `def` normal. /// ### `FileResponse` { #fileresponse } Transmite un archivo asincrónicamente como response. Toma un conjunto diferente de argumentos para crear un instance que los otros tipos de response:Created: Sun Dec 28 07:19:09 GMT 2025 - Last Modified: Wed Dec 17 20:41:43 GMT 2025 - 13.2K bytes - Click Count (0) -
docs/ru/docs/advanced/custom-response.md
/// tip | Совет Заметьте, что здесь мы используем стандартный `open()`, который не поддерживает `async` и `await`, поэтому объявляем операцию пути обычной `def`. /// ### `FileResponse` { #fileresponse } Асинхронно отправляет файл как ответ. Для создания экземпляра принимает иной набор аргументов, чем другие типы ответов: - `path` — путь к файлу, который будет отправлен.Created: Sun Dec 28 07:19:09 GMT 2025 - Last Modified: Wed Dec 17 20:41:43 GMT 2025 - 19.7K bytes - Click Count (0)