Created
August 22, 2017 07:20
-
-
Save AnsonYe/10a30b604c37896b1907ece050109f37 to your computer and use it in GitHub Desktop.
List all azure containers in python
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from azure.storage.blob import BlobService | |
blob_service=BlobService(account_name='x', account_key='x', ) | |
marker=None | |
while True: | |
containers = blob_service.list_containers(marker=marker) | |
for c in containers: | |
print c.name | |
if containers.next_marker: | |
marker = containers.next_marker | |
else: | |
break |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment