I'm trying to to store about 350MB of binary data to peewee.BlobField but it is showing a MemoryError. I have no issues with smaller files like 250MB. How can I store 350MB?
This is how I am trying to store data:
Subproducts.create(cfg_id=config_id,
c=c,
mf=mf_data.getbuffer()
type(mf_data) is <class '_io.BytesIO'>
This is how my model looks like:
class Subproducts(BaseModel):
cfg = peewee.ForeignKeyField(ConfigModel, related_name='cfg')
c = peewee.TextField()
mf = peewee.BlobField()
class Meta:
indexes = (
(('cfg', 'c'), True),
)