- Sort Score
- Result 10 results
- Languages All
Results 1 - 10 of 33 for UJSONResponse (0.28 sec)
-
docs_src/custom_response/tutorial001.py
from fastapi import FastAPI from fastapi.responses import UJSONResponse app = FastAPI() @app.get("/items/", response_class=UJSONResponse) async def read_items():
Python - Registered: Sun Apr 28 07:19:10 GMT 2024 - Last Modified: Thu Mar 26 19:09:53 GMT 2020 - 197 bytes - Viewed (0) -
docs/de/docs/reference/responses.md
ORJSONResponse, PlainTextResponse, RedirectResponse, Response, StreamingResponse, UJSONResponse, ) ``` ## FastAPI-Responses Es gibt einige benutzerdefinierte FastAPI-Responseklassen, welche Sie verwenden können, um die JSON-Performanz zu optimieren. ::: fastapi.responses.UJSONResponse options: members: - charset - status_code - media_type
Plain Text - Registered: Sun Apr 28 07:19:10 GMT 2024 - Last Modified: Mon Feb 19 15:53:39 GMT 2024 - 3.8K bytes - Viewed (0) -
fastapi/responses.py
import ujson except ImportError: # pragma: nocover ujson = None # type: ignore try: import orjson except ImportError: # pragma: nocover orjson = None # type: ignore class UJSONResponse(JSONResponse): """ JSON response using the high-performance ujson library to serialize data to JSON. Read more about it in the
Python - Registered: Sun Apr 28 07:19:10 GMT 2024 - Last Modified: Wed Oct 18 12:36:40 GMT 2023 - 1.7K bytes - Viewed (0) -
docs/en/docs/reference/responses.md
ORJSONResponse, PlainTextResponse, RedirectResponse, Response, StreamingResponse, UJSONResponse, ) ``` ## FastAPI Responses There are a couple of custom FastAPI response classes, you can use them to optimize JSON performance. ::: fastapi.responses.UJSONResponse options: members: - charset - status_code - media_type
Plain Text - Registered: Sun Apr 28 07:19:10 GMT 2024 - Last Modified: Thu Apr 18 19:53:19 GMT 2024 - 3.7K bytes - Viewed (0) -
docs/zh/docs/advanced/custom-response.md
如上文所述,这是 **FastAPI** 中使用的默认响应。 ### `ORJSONResponse` 如上文所述,`ORJSONResponse` 是一个使用 <a href="https://github.com/ijl/orjson" class="external-link" target="_blank">`orjson`</a> 的快速的可选 JSON 响应。 ### `UJSONResponse` `UJSONResponse` 是一个使用 <a href="https://github.com/ultrajson/ultrajson" class="external-link" target="_blank">`ujson`</a> 的可选 JSON 响应。 !!! warning "警告" 在处理某些边缘情况时,`ujson` 不如 Python 的内置实现那么谨慎。
Plain Text - Registered: Sun Apr 28 07:19:10 GMT 2024 - Last Modified: Thu May 12 00:06:16 GMT 2022 - 7.8K bytes - Viewed (1) -
docs/de/docs/advanced/custom-response.md
Der Inhalt, den Sie von Ihrer *Pfadoperation-Funktion* zurückgeben, wird in diese `Response` eingefügt. Und wenn diese `Response` einen JSON-Medientyp (`application/json`) hat, wie es bei `JSONResponse` und `UJSONResponse` der Fall ist, werden die von Ihnen zurückgegebenen Daten automatisch mit jedem Pydantic `response_model` konvertiert (und gefiltert), das Sie im *Pfadoperation-Dekorator* deklariert haben. !!! note "Hinweis"
Plain Text - Registered: Sun Apr 28 07:19:10 GMT 2024 - Last Modified: Tue Jan 23 13:05:12 GMT 2024 - 13.5K bytes - Viewed (0) -
docs/ja/docs/advanced/custom-response.md
しかし、*path operationデコレータ* に、使いたい `Response` を宣言することもできます。 *path operation関数* から返されるコンテンツは、その `Response` に含まれます。 そしてもし、`Response` が、`JSONResponse` や `UJSONResponse` の場合のようにJSONメディアタイプ (`application/json`) ならば、データは *path operationデコレータ* に宣言したPydantic `response_model` により自動的に変換 (もしくはフィルタ) されます。 !!! note "備考"
Plain Text - Registered: Sun Apr 28 07:19:10 GMT 2024 - Last Modified: Mon Jul 19 19:14:58 GMT 2021 - 10.7K bytes - Viewed (0) -
docs/en/docs/advanced/custom-response.md
The contents that you return from your *path operation function* will be put inside of that `Response`. And if that `Response` has a JSON media type (`application/json`), like is the case with the `JSONResponse` and `UJSONResponse`, the data you return will be automatically converted (and filtered) with any Pydantic `response_model` that you declared in the *path operation decorator*. !!! note
Plain Text - Registered: Sun Apr 28 07:19:10 GMT 2024 - Last Modified: Thu Apr 18 19:53:19 GMT 2024 - 11.7K bytes - Viewed (0) -
docs/em/docs/advanced/custom-response.md
✋️ 👆 💪 📣 `Response` 👈 👆 💚 ⚙️, *➡ 🛠️ 👨🎨*. 🎚 👈 👆 📨 ⚪️➡️ 👆 *➡ 🛠️ 🔢* 🔜 🚮 🔘 👈 `Response`. & 🚥 👈 `Response` ✔️ 🎻 📻 🆎 (`application/json`), 💖 💼 ⏮️ `JSONResponse` & `UJSONResponse`, 💽 👆 📨 🔜 🔁 🗜 (& ⛽) ⏮️ 🙆 Pydantic `response_model` 👈 👆 📣 *➡ 🛠️ 👨🎨*. !!! note 🚥 👆 ⚙️ 📨 🎓 ⏮️ 🙅♂ 📻 🆎, FastAPI 🔜 ⌛ 👆 📨 ✔️ 🙅♂ 🎚, ⚫️ 🔜 🚫 📄 📨 📁 🚮 🏗 🗄 🩺. ## ⚙️ `ORJSONResponse`
Plain Text - Registered: Sun Apr 28 07:19:10 GMT 2024 - Last Modified: Sat Apr 01 09:26:04 GMT 2023 - 9.8K bytes - Viewed (0) -
docs/it/docs/index.md
* <a href="https://github.com/ijl/orjson" target="_blank"><code>orjson</code></a> - ichiesto se vuoi usare `ORJSONResponse`. * <a href="https://github.com/esnme/ultrajson" target="_blank"><code>ujson</code></a> - Richiesto se vuoi usare `UJSONResponse`. Puoi installarle tutte con `pip install fastapi[all]`. ## Licenza
Plain Text - Registered: Sun Apr 28 07:19:10 GMT 2024 - Last Modified: Thu Apr 18 23:58:47 GMT 2024 - 19.3K bytes - Viewed (0)