Last active
October 31, 2020 09:02
-
-
Save amacal/40004ec711e31a5a52b20be77d34ee08 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from zipfile import ZipFile, Path | |
with ZipFile('archive.zip', 'w') as archive: | |
# include single file | |
archive.write('terraform') | |
# nested file | |
archive.write('docs-pdf/faq.pdf') | |
# or inline content | |
archive.writestr('description.txt', data='content') |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment