title: How to download Azure Function (Python) .zip file?
body: <p>The docs <a href="https://docs.microsoft.com/en-us/azure/azure-functions/deployment-zip-push#download-your-function-app-files" rel="nofollow noreferrer">here</a> (from 2018) say to click <code>Download app content</code> from the Portal to retrieve a .zip file of your Azure Function.</p>
  <p><strong>However, this option is grayed out for my Python function:</strong></p>
  <p><a href="https://i.stack.imgur.com/6iEYa.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/6iEYa.png" alt="enter image description here" /></a></p>
  <p>The doc goes on to provide an alternative method for retrieving a .zip file using REST API with the following url <code>https://&lt;function_app&gt;.scm.azurewebsites.net/api/zip/site/wwwroot/</code>.</p>
  <p>Unfortunately, this downloads a <code>download.zip</code> file containing only the <code>hosts.json</code> file rather than the Function code and associated files.</p>
  <p><a href="https://i.stack.imgur.com/vVGOi.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/vVGOi.png" alt="enter image description here" /></a></p>
  <p>So, how do I download my Python Function as a .zip file from either Azure Portal, REST API or the scm backend?</p>
  <p><strong>EDIT 1:</strong>
  Trying the two proposed solutions so far yield no results either.</p>
  <ul>
  <li><p><code>AzureWebJobsStorage</code>: No <code>scm-deployments</code> container available.
  <a href="https://i.stack.imgur.com/YsVNh.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/YsVNh.png" alt="enter image description here" /></a></p>
  </li>
  <li><p>FTPS option: No .zip file available. Only the <code>host.json</code> file.
  <a href="https://i.stack.imgur.com/j0gsY.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/j0gsY.png" alt="enter image description here" /></a></p>
  </li>
  </ul>