title: Python Zip an existing directory in to a temporary directory
body: <p>I'm trying to compress an existing directory (containing sub folders) in to a temporary directory, so I can upload to cloud storage. The zip file should not remain locally.</p>
  <p>I see <code>shutil.make_archive</code> but I can't see how to use this with a temporary directory.</p>
  <p>Is it supposed to be used like this:</p>
  <pre><code>with tempfile.TemporaryDirectory() as zippedDir:
      shutil.make_archive(&quot;/dir_to_zip/&quot;, &quot;zip&quot;, zippedDir)
  </code></pre>