- Sort Score
- Result 10 results
- Languages All
Results 1 - 10 of 808 for orjson (0.04 sec)
-
fastapi/responses.py
""" def render(self, content: Any) -> bytes: assert orjson is not None, "orjson must be installed to use ORJSONResponse" return orjson.dumps( content, option=orjson.OPT_NON_STR_KEYS | orjson.OPT_SERIALIZE_NUMPYRegistered: Sun Dec 28 07:19:09 UTC 2025 - Last Modified: Wed Oct 18 12:36:40 UTC 2023 - 1.7K bytes - Viewed (0) -
docs_src/custom_response/tutorial009c_py39.py
from typing import Any import orjson from fastapi import FastAPI, Response app = FastAPI() class CustomORJSONResponse(Response): media_type = "application/json" def render(self, content: Any) -> bytes: assert orjson is not None, "orjson must be installed" return orjson.dumps(content, option=orjson.OPT_INDENT_2) @app.get("/", response_class=CustomORJSONResponse) async def main():
Registered: Sun Dec 28 07:19:09 UTC 2025 - Last Modified: Wed Dec 17 20:41:43 UTC 2025 - 451 bytes - Viewed (0) -
tests/test_default_response_class.py
from typing import Any import orjson from fastapi import APIRouter, FastAPI from fastapi.responses import HTMLResponse, JSONResponse, PlainTextResponse from fastapi.testclient import TestClient class ORJSONResponse(JSONResponse): media_type = "application/x-orjson" def render(self, content: Any) -> bytes: return orjson.dumps(content) class OverrideResponse(JSONResponse): media_type = "application/x-override"
Registered: Sun Dec 28 07:19:09 UTC 2025 - Last Modified: Sun Mar 01 20:49:20 UTC 2020 - 5.2K bytes - Viewed (0) -
requirements-tests.txt
strawberry-graphql >=0.200.0,< 1.0.0 anyio[trio] >=3.2.1,<5.0.0 PyJWT==2.9.0 pyyaml >=5.3.1,<7.0.0 pwdlib[argon2] >=0.2.1 inline-snapshot>=0.21.1 pytest-codspeed==4.2.0 # types types-ujson ==5.10.0.20240515
Registered: Sun Dec 28 07:19:09 UTC 2025 - Last Modified: Fri Dec 26 10:43:02 UTC 2025 - 394 bytes - Viewed (0) -
docs/zh/docs/advanced/custom-response.md
### `JSONResponse` 接受数据并返回一个 `application/json` 编码的响应。 如上文所述,这是 **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 | 警告
Registered: Sun Dec 28 07:19:09 UTC 2025 - Last Modified: Mon Nov 18 02:25:44 UTC 2024 - 7.5K bytes - Viewed (0) -
pyproject.toml
"itsdangerous >=1.1.0", # For Starlette's schema generation, would not be used with FastAPI "pyyaml >=5.3.1", # For UJSONResponse "ujson >=4.0.1,!=4.0.2,!=4.1.0,!=4.2.0,!=4.3.0,!=5.0.0,!=5.1.0", # For ORJSONResponse "orjson >=3.2.1", # To validate email fields "email-validator >=2.0.0", # Uvicorn with uvloop "uvicorn[standard] >=0.12.0", # Settings management
Registered: Sun Dec 28 07:19:09 UTC 2025 - Last Modified: Sat Dec 27 12:54:56 UTC 2025 - 9.3K bytes - Viewed (0) -
src/main/java/org/codelibs/fess/app/web/api/admin/backup/ApiAdminBackupAction.java
} /** * Retrieves a list of available backup files. * * @return JSON response with backup file list */ // GET /api/admin/backup/files @Execute public JsonResponse<ApiResult> files() { final List<Map<String, String>> list = getBackupItems(); return asJson(new ApiBackupFilesResponse().files(list).total(list.size()).status(ApiResult.Status.OK).result()); } /**Registered: Sat Dec 20 09:19:18 UTC 2025 - Last Modified: Thu Jul 17 08:28:31 UTC 2025 - 6.6K bytes - Viewed (0) -
src/main/java/org/codelibs/fess/app/web/api/admin/suggest/ApiAdminSuggestAction.java
body.queryWordsNum = suggestHelper.getQueryWordsNum(); return asJson(new ApiResult.ApiConfigResponse().setting(body).status(ApiResult.Status.OK).result()); } /** * Deletes all suggest words from the system. * * @return JSON response indicating success or failure */ // DELETE /api/admin/suggest/all @Execute
Registered: Sat Dec 20 09:19:18 UTC 2025 - Last Modified: Thu Jul 17 08:28:31 UTC 2025 - 3.8K bytes - Viewed (0) -
.github/workflows/test-redistribute.yml
Registered: Sun Dec 28 07:19:09 UTC 2025 - Last Modified: Fri Nov 21 13:03:21 UTC 2025 - 1.8K bytes - Viewed (0) -
src/main/java/org/codelibs/fess/app/web/api/admin/reqheader/ApiAdminReqheaderAction.java
* * @param id the ID of the request header setting to retrieve * @return JSON response containing the request header setting */ // GET /api/admin/reqheader/setting/{id} @Execute public JsonResponse<ApiResult> get$setting(final String id) { return asJson(new ApiConfigResponse().setting(reqHeaderService.getRequestHeader(id).map(this::createEditBody).orElseGet(() -> {Registered: Sat Dec 20 09:19:18 UTC 2025 - Last Modified: Thu Aug 07 03:06:29 UTC 2025 - 9.1K bytes - Viewed (0)