This page cannot be shown here. You can still read it on the original site — the toolbar below keeps your place in the directory.
In Python, BytesIO is the way to store binary data in memory. Most examples you’ll see using zip files in memory is to store string data and indeed the most common example you’ll find online from the zipfile module is zipfile.writestr(file_name, 'Text Data') . But what if you want to store binary data of a PDF or Excel Spreadsheet that’s also in memory? You could use zipfile.write() (designed to…
Comments
Nothing yet. Say the first thing.
Sign in to join the conversation.