azure

Azure WebsiteManagementClient for Python: how to get web app by ID?

Azure WebsiteManagementClient for Python: how to get web app by ID? Question: I’m using version 7.0.0 of azure-mgmt-web for Python. I know we can fetch a site with: from azure.mgmt.web import WebSiteManagementClient web_client = WebSiteManagementClient(…credentials here…) site = web_client.web_apps.get(RESOURCE_GROUP_NAME, SITE_NAME) But is there a way to fetch the same resource by using its full ID? …

Total answers: 1

List and manage Azure Resource Locks with Python SDK

List and manage Azure Resource Locks with Python SDK Question: I am trying to list and loop through Azure Resource Locks of a resource group by using Python SDK. from azure.mgmt.resource.locks.v2016_09_01.aio import ManagementLockClient management_lock_client = ManagementLockClient(credential, subscription.subscription_id) locks = management_lock_client.management_locks.list_at_resource_group_level(resource__group_snapshot) for lock in locks: management_lock_client.management_locks.delete(resource__group_snapshot, lock.name) But here, I get the error: for lock in …

Total answers: 1

Azure Pronunciation Assessment SDK return wrong result compare with api call

Azure Pronunciation Assessment SDK return wrong result compare with api call Question: I’m using azure speech sdk to do pronunciation assessment, it works fine when i used api provide by azure, but when i use speech sdk the result is not correct. I follow the sample from cognitive services speech sdk Here is the code …

Total answers: 2

Timeout error while uploading to large file in adls

Timeout error while uploading to large file in adls Question: I need to upload a 200 mb file to adls using python. I’m using the code provided in the official documentation – https://learn.microsoft.com/en-us/azure/storage/blobs/data-lake-storage-directory-file-acl-python?tabs=azure-ad While calling the following function for upload – def upload_file_to_directory_bulk(): try: file_system_client = service_client.get_file_system_client(file_system="system") directory_client = file_system_client.get_directory_client("my-directory") file_client = directory_client.get_file_client("uploaded-file.txt") local_file = …

Total answers: 2

Cannot connect to Azure SQL from Azure functions

Cannot connect to Azure SQL from Azure functions Question: I am trying to send some data from an Azure function to an Azure SQL DB, it seems that the function’s underlying linux image does not have PYODBC driver 18. I am using a managed identity to connect and it worked fine earlier on a linux …

Total answers: 1

How to copy entire structure between storage accounts in python

How to copy entire structure between storage accounts in python Question: my case is the following: Two Azure Storage Accounts (Source/Destination) Source Account may contain multiple containers, folders, blobs, etc. All of the above needs to be copied exactly in the same structure to the DESTINATION account. If any elements already exist in the Destination …

Total answers: 1

Managing Connections in an Azure Serverless Function App

Managing Connections in an Azure Serverless Function App Question: Microsoft recommends you maintain a single instance of CosmosClient across your whole application, and I’m trying to achieve this in my Function App (with more than just CosmosClient). However, even when re-using both database & container proxies, I always see a warning that I have hit …

Total answers: 1

Change languag of text to speech

Change languag of text to speech Question: I want to change the voice of azure from python, with these characteristics languageCode = ‘es‑MX’ ssmlGender = ‘FEMALE’ voicName = ‘es‑MX‑DaliaNeural’ but i’m new to azure so i don’t know how, this is my code: import PyPDF2 import azure.cognitiveservices.speech as sdk key = "fake key" region = …

Total answers: 1

Write a variable's data as it is in ADLS file

Write a variable's data as it is in ADLS file Question: I want to write the content of a variable that is created dynamically in the program to a ADLS file. This is how I am getting the data – @dataclass class pipeline_run: id:str group_id:str run_start:str run_end:str pipeline_name:str pipeline_status:str parameters:str message:str addl_properties:str runs = adf_client.pipeline_runs.query_by_factory(rg_name, …

Total answers: 1

Azure Cognitive Search:

Azure Cognitive Search: Question: I have recently upgraded my Azure Cognitive Search instance so it has semantic search. However, when I add query_type=semantic, in the client search I get the following stacktrace… Traceback (most recent call last): File "call_semantic_search.py", line 34, in <module> c, r = main(search_text=’what is a ‘) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "call_semantic_search.py", line 28, …

Total answers: 2