-
Notifications
You must be signed in to change notification settings - Fork 3.2k
Description
Error Description:
Azurite is an Azure Storage emulator.
In the StorageAccountHostsMixin class of the python sdk, there is no correct way to handle the endpoints of the azurite storage table.
ValueError: Unable to determine account name for shared key credential.
The reason is the storage tables endpoint for Azurite is different from the one of an Azure storage account.
In Azurite, storage tables endpoint constructed is shown as following:
https://127.0.0.1:10002/<account-name>/<resource-path>
In Azure SDK for python, storage tables endpoint constructed is shown as following:
https://<account-name>.table.core.windows.net/<resource-path>
Error Track:
The code is about processing the azurite storage tables endpoint in azure sdk for python is here:


To Reproduce:
A demo code is shown as following:
from azure.data.tables import TableServiceClient
account_url = '<Azurite_tables_account_url>'
access_key = '<Azurite_tables_access_key>'
table_service_client = TableServiceClient(account_url=account_url, credential=access_key)
table_item = table_service_client.create_table(table_name="myTable")
print("Created table {}!".format(table_item.table_name))
Expected Behavior
There is a correct way to handle azurite storage table endpoints in python SDK. Finally, able to successfully access azurite.
@jongio for notification.