You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
You can do something like this. Instead of providing file name you can provide io.BytesIO object and then you can save content of that buffer from the memory to the file, database or anywhere you want. In this example I save it to the file but you can pass content of bk.getbuffer() anywhere you want.
import io
bk = io.BytesIO()
epub.write_epub(bk, book, {})
with open("book.epub", "wb") as f:
f.write(bk.getbuffer())
I want to create book but instead of saving it to file and then storing it to db it would be nice to do this directly
The text was updated successfully, but these errors were encountered: