Skip to main content
1 vote
0 answers
85 views

This question came up while I was saving a large number of model-inferred embeddings to plain text. To do so, I needed to convert lists of float embeddings into strings, and I found this conversion to ...
K_Augus's user avatar
  • 474
-1 votes
1 answer
133 views

In my project I analyze the questions of a given exam. Let's say each exam has 10 questions. For each question I compute some stuff and save it, using the constructor method of class QuestionData (...
Spätzle's user avatar
  • 767
1 vote
0 answers
1k views

I tried to load a .json file with standard JSON library. It works fine, but slowly: with open(file, 'r', encoding="utf-8") as jfile: lines = json.loads(jfile.read()) I tried to use the ...
Myky's user avatar
  • 21
7 votes
1 answer
7k views

I am writing code to receive a JSON payload in FastAPI. Here is my code: from fastapi import FastAPI, status, Request from fastapi.responses import ORJSONResponse import uvicorn import asyncio import ...
Nguyen's user avatar
  • 83
5 votes
2 answers
4k views

I am trying to install orjson==3.3.0 on my MacBook Pro with Apple M1 Pro chip running macOS Monterey 12.2.1. Python version: 3.8.9 Command used: pip install orjson==3.3.0 Error: Collecting orjson==3.3....
ttan's user avatar
  • 51
1 vote
3 answers
3k views

We have some issues deploying our GCP Dataflow pipeline. After some analysis, found that the latest version of apache-beam has some issues while installing. To replicate the issue I created a ...
Prasad Sawant's user avatar
1 vote
1 answer
2k views

I am new to pydantic and am stuck. Below code is throwing error TypeError: Type is not JSON serializable: Person from pydantic import BaseModel,Extra from typing import Mapping, Optional, Any,List ...
Naxi's user avatar
  • 2,264
32 votes
7 answers
74k views

I am having below pydantic models. class SubModel(BaseModel): columns: Mapping key: List[str] required: Optional[List[str]] class Config: anystr_strip_whitespace: True ...
Naxi's user avatar
  • 2,264
0 votes
2 answers
966 views

Http headers can be modified in fastAPI; however when I tried to use faster serializer (in this instance ORJSONResponse) in order to have faster response, all added or modified headers confusingly is ...
Ahad Rafat Talebi's user avatar
2 votes
2 answers
7k views

Using orjson to serializing response has a remarkable effect on the speed of fastAPI restful services, specifically for very big objects. As I have read in the official documentation, we can use the ...
Ahad Rafat Talebi's user avatar
9 votes
2 answers
25k views

I have switched to orjson since it is faster, but this has caused an issue I have had for a fair amount of time now but never thought anything of it. I finally decided to do tests and these were my ...
CoN's user avatar
  • 91
5 votes
1 answer
8k views

Hi I'm trying to install fastapi, but it seems to be failing when im installing orjson Here is the full error code: Building wheel for orjson (PEP 517) ... error ERROR: Command errored out with ...
LearningNoob's user avatar
1 vote
3 answers
9k views

I have been struggling with this and I need some help. I am trying to create a docker image of my python app. My App uses orjson, the fast JSON library for python. Parts of this library is built ...
vivekv's user avatar
  • 2,308