I'm having an issue with blobs in the database. According to the documentation, this field type is mapped to Python str.
When looking at the code, this is done with .decode('utf-8')
. However, in our database we have some raw images, which of course can't be decoded as utf-8.
When looking through the adapter code (emmett/orm/adapters.py 229: def parse
), I saw an option blob_decode
.
However, I can't seem to find where to set that option. Is this an argument to app.config.db
or adapter_args
?
I have monkey patched the emmett.orm.adapters.parse
method to forcefully set blob_decode
to False, but that's very hacky and I've already seen some selects where my patch is not applied.
Summary: how do I get raw bytes from my bytea/blob database fields?
Pay now to fund the work behind this issue.
Get updates on progress being made.
Maintainer is rewarded once the issue is completed.
You're funding impactful open source efforts
You want to contribute to this effort
You want to get funding like this too