title: How to generate download URL for azure container in Python
body: <p>I have a <code>container</code> named <code>test</code> in <code>azure storage</code>. I want to generate <code>URL</code> for this. File directory inside it looks like below:</p>
  <pre><code>test
      -&gt; annotate # This is a dir
          -&gt; file1.txt
          -&gt; file2.txt
      -&gt; images # This is a dir
          -&gt; file1.jpg
          -&gt; file2.jpg
  </code></pre>
  <p>I want to generate URL so that when it is accessed I can download the complete container <code>test</code> including all the files and directories inside it. Now I have done this before but in that approach I was only downloading the blob using below code:</p>
  <pre><code>account_name = &quot;deeusblobstorage&quot;
  container_name = &quot;rperodct&quot;
  blob_name = &quot;face_1_7285.jpg&quot;
  account_key = &quot;hMlIRXCjAomfDRfied8Y5FPwTVnWEkEDuVsw//CQtkiOdcFD/y5wUcxH9Ou7Ni+DtDQFwe23YbZ3Qia9gw==&quot;
  url = f&quot;https://{account_name}.blob.core.windows.net/{container_name}/{blob_name}&quot;
  sas_token = generate_blob_sas(
      account_name=account_name,
      account_key=account_key,
      container_name=container_name,
      blob_name=blob_name,
      permission=AccountSasPermissions(read=True),
      expiry=datetime.datetime.utcnow() + timedelta(hours=1)
  )
  
  url_with_sas = f&quot;{url}?{sas_token}&quot;
  print(url_with_sas)
  </code></pre>
  <p>In the above code I was specifically mentioning the blob inside the container to download, which then generates url. But how can we generate url for a container so that all the files and directories inside it can also be downloaded. Thanks</p>