- Sort Score
- Result 10 results
- Languages All
Results 1 - 10 of 13 for FileResponse (0.21 sec)
-
fastapi/responses.py
from typing import Any from starlette.responses import FileResponse as FileResponse # noqa from starlette.responses import HTMLResponse as HTMLResponse # noqa from starlette.responses import JSONResponse as JSONResponse # noqa from starlette.responses import PlainTextResponse as PlainTextResponse # noqa from starlette.responses import RedirectResponse as RedirectResponse # noqa from starlette.responses import Response as Response # noqa
Python - Registered: Sun May 05 07:19:11 GMT 2024 - Last Modified: Wed Oct 18 12:36:40 GMT 2023 - 1.7K bytes - Viewed (0) -
docs/en/docs/reference/responses.md
You can import them directly from `fastapi.responses`: ```python from fastapi.responses import ( FileResponse, HTMLResponse, JSONResponse, ORJSONResponse, PlainTextResponse, RedirectResponse, Response, StreamingResponse, UJSONResponse, ) ``` ## FastAPI Responses
Plain Text - Registered: Sun May 05 07:19:11 GMT 2024 - Last Modified: Thu Apr 18 19:53:19 GMT 2024 - 3.7K bytes - Viewed (0) -
docs/de/docs/reference/responses.md
Sie können diese direkt von `fastapi.responses` importieren: ```python from fastapi.responses import ( FileResponse, HTMLResponse, JSONResponse, ORJSONResponse, PlainTextResponse, RedirectResponse, Response, StreamingResponse, UJSONResponse, ) ``` ## FastAPI-Responses
Plain Text - Registered: Sun May 05 07:19:11 GMT 2024 - Last Modified: Mon Feb 19 15:53:39 GMT 2024 - 3.8K bytes - Viewed (0) -
docs/zh/docs/advanced/additional-responses.md
例如,您可以添加一个额外的媒体类型` image/png` ,声明您的路径操作可以返回JSON对象(媒体类型 `application/json` )或PNG图像: ```Python hl_lines="19-24 28" {!../../../docs_src/additional_responses/tutorial002.py!} ``` !!! Note - 请注意,您必须直接使用 `FileResponse` 返回图像。 !!! Info - 除非在 `responses` 参数中明确指定不同的媒体类型,否则**FastAPI**将假定响应与主响应类具有相同的媒体类型(默认为` application/json` )。 - 但是如果您指定了一个自定义响应类,并将 `None `作为其媒体类型,**FastAPI**将使用 `application/json` 作为具有关联模型的任何其他响应。 ## 组合信息
Plain Text - Registered: Sun May 05 07:19:11 GMT 2024 - Last Modified: Tue Jan 09 15:53:39 GMT 2024 - 8.2K bytes - Viewed (0) -
docs/fr/docs/advanced/additional-responses.md
Plain Text - Registered: Sun May 05 07:19:11 GMT 2024 - Last Modified: Thu Apr 18 19:53:19 GMT 2024 - 9.6K bytes - Viewed (0) -
docs/de/docs/advanced/additional-responses.md
Plain Text - Registered: Sun May 05 07:19:11 GMT 2024 - Last Modified: Sat Mar 30 20:19:26 GMT 2024 - 9.6K bytes - Viewed (0) -
docs/en/docs/advanced/additional-responses.md
```Python hl_lines="19-24 28" {!../../../docs_src/additional_responses/tutorial002.py!} ``` !!! note Notice that you have to return the image using a `FileResponse` directly. !!! info Unless you specify a different media type explicitly in your `responses` parameter, FastAPI will assume the response has the same media type as the main response class (default `application/json`).
Plain Text - Registered: Sun May 05 07:19:11 GMT 2024 - Last Modified: Thu Jan 11 16:31:18 GMT 2024 - 8.8K bytes - Viewed (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` Streamt eine Datei asynchron als Response. Nimmt zur Instanziierung einen anderen Satz von Argumenten entgegen als die anderen Response-Typen: * `path` – Der Dateipfad zur Datei, die gestreamt werden soll.
Plain Text - Registered: Sun May 05 07:19:11 GMT 2024 - Last Modified: Tue Jan 23 13:05:12 GMT 2024 - 13.5K bytes - Viewed (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` Asynchronously streams a file as the response. Takes a different set of arguments to instantiate than the other response types: * `path` - The filepath to the file to stream.
Plain Text - Registered: Sun May 05 07:19:11 GMT 2024 - Last Modified: Thu Apr 18 19:53:19 GMT 2024 - 11.7K bytes - Viewed (0) -
docs/pl/docs/index.md
* <a href="https://github.com/Tinche/aiofiles" target="_blank"><code>aiofiles</code></a> - Wymagane jeżeli chcesz korzystać z `FileResponse` albo `StaticFiles`. * <a href="https://jinja.palletsprojects.com" target="_blank"><code>jinja2</code></a> - Wymagane jeżeli chcesz używać domyślnej konfiguracji szablonów.
Plain Text - Registered: Sun May 05 07:19:11 GMT 2024 - Last Modified: Mon Apr 29 05:18:04 GMT 2024 - 19.4K bytes - Viewed (0)