Ask coding questions

← Back to all posts
Download zip in Python
ruiwenge2 (1209)

How can I generate a zip and download it in Python?

Comments
hotnewtop
ruiwenge2 (1209)

@InvisibleOne i mean use some code to generate a zip and download it

SixBeeps (5353)

@ruiwenge2 You definitely won't be able to download it programmatically, that'd be too much of a security risk. You can, however, zip a directory on the Repl.

To do that, use the zip command by calling either os.system() or subprocess.run()