- Sort Score
- Result 10 results
- Languages All
Results 1 - 10 of 848 for orjson (0.05 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_NUMPY
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Wed Oct 18 12:36:40 UTC 2023 - 1.7K bytes - Viewed (0) -
docs_src/custom_response/tutorial009c.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 Nov 03 07:19:11 UTC 2024 - Last Modified: Thu Sep 01 09:32:30 UTC 2022 - 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 Nov 03 07:19:11 UTC 2024 - Last Modified: Sun Mar 01 20:49:20 UTC 2020 - 5.2K bytes - Viewed (0) -
docs/em/docs/advanced/custom-response.md
## ๐ ๐จ ๐ ๐ ๐ช โ ๐ ๐ ๐ ๐จ ๐, ๐ โช๏ธโก๏ธ `Response` & โ๏ธ โซ๏ธ. ๐ผ, โก๏ธ ๐ฌ ๐ ๐ ๐ โ๏ธ <a href="https://github.com/ijl/orjson" class="external-link" target="_blank">`orjson`</a>, โ๏ธ โฎ๏ธ ๐ โ ๐ซ โ๏ธ ๐ `ORJSONResponse` ๐. โก๏ธ ๐ฌ ๐ ๐ โซ๏ธ ๐จ ๐ & ๐ ๐ป, ๐ ๐ โ๏ธ Orjson ๐ `orjson.OPT_INDENT_2`. ๐ ๐ช โ `CustomORJSONResponse`. ๐ ๐ ๐ โ๏ธ โ `Response.render(content)` ๐ฉโ๐ฌ ๐ ๐จ ๐ `bytes`:
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Sun Oct 06 20:36:54 UTC 2024 - 9.7K 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 Nov 03 07:19:11 UTC 2024 - Last Modified: Sun Oct 06 20:36:54 UTC 2024 - 7.7K bytes - Viewed (0) -
requirements-tests.txt
dirty-equals ==0.6.0 sqlmodel==0.0.22 flask >=1.1.2,<4.0.0 anyio[trio] >=3.2.1,<4.0.0 PyJWT==2.8.0 pyyaml >=5.3.1,<7.0.0 passlib[bcrypt] >=1.7.2,<2.0.0 inline-snapshot==0.13.0 # types types-ujson ==5.7.0.1
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Fri Nov 01 11:17:12 UTC 2024 - 333 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 Nov 03 07:19:11 UTC 2024 - Last Modified: Tue Oct 22 14:19:56 UTC 2024 - 7.9K bytes - Viewed (0) -
internal/logger/target/console/console.go
func (c *Target) Send(e interface{}) error { entry, ok := e.(log.Entry) if !ok { return fmt.Errorf("Uexpected log entry structure %#v", e) } if logger.IsJSON() { logJSON, err := json.Marshal(&entry) if err != nil { return err } fmt.Fprintln(c.output, string(logJSON)) return nil } if entry.Level == logger.EventKind { fmt.Fprintln(c.output, entry.Message) return nil }
Registered: Sun Nov 03 19:28:11 UTC 2024 - Last Modified: Fri May 24 23:05:23 UTC 2024 - 3.9K bytes - Viewed (0) -
src/main/java/org/codelibs/fess/app/web/api/admin/backup/ApiAdminBackupAction.java
// 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()); } // GET /api/admin/backup/file/{id} @Execute public StreamResponse get$file(final String id) {
Registered: Thu Oct 31 13:40:30 UTC 2024 - Last Modified: Sat Oct 12 01:54:15 UTC 2024 - 6.1K bytes - Viewed (0) -
src/main/java/org/codelibs/fess/app/web/api/admin/dict/protwords/ApiAdminDictProtwordsAction.java
body.dictId = dictId; validateApi(body, messages -> {}); final ProtwordsPager pager = copyBeanToNewBean(body, ProtwordsPager.class); return asJson(new ApiResult.ApiConfigsResponse<EditBody>() .settings(protwordsService.getProtwordsList(body.dictId, pager).stream()
Registered: Thu Oct 31 13:40:30 UTC 2024 - Last Modified: Thu Feb 22 01:53:18 UTC 2024 - 7.2K bytes - Viewed (0)