I am extracting large files from zip in a python script like this:
import zipfile
import tempfile
tmpdir = tempfile.mkdtemp()
zf = zipfile.ZipFile('/path/to/file.zip')
zf.extractall(tmpdir)
This works fine but for large files this consumes too much memory to run it on small servers.
Is there a way to control/limit how much memory this extraction uses?