I have an object Vm of Type <class ‘azure.mgmt.compute.v2019_07_01.models._models_py3.VirtualMachine’> I want to iterate over this object by a loop so that I don’t have to manually extract the values. Yes I’ve tried isinstance to check whether the value is of type <class ̵…
Tag: azure
How to check if a folder exist or not in Azure container using Python?
I have a storage container and inside that I have 3 levels of directories as follow: I need to check are there any blob present in Folder3 or even better just check if Folder3 exist or not. I tried to use blob_exist = BlobClient.from_connection_string(conn_str = os.getenv(“conString”), container_n…
Uploading files from Azure Blob Storage to SFTP location using Databricks?
I have a scenario where I need to copy files from Azure Blob Storage to SFTP location in Databricks Is there a way to achieve this scenario using pySpark or Scala? Answer Regarding the issue, please refer to the following steps (I use scala) Mount Azure Blob storage containers to DBFS Copy these file to clust…
Running two files on a single project on PyCharm
I am currently developing a IoT sensor value simulator using the PyCharm IDE (along with pygame). Essentially, I am trying to produce/send data to Microsoft Azure IoT platform while there is a GUI available for users, in which they can see the temperatures of each sensor, change the sensor outputs, etc. Since…
Authenticating Azure CLI with Python SDK
I am writing some functions to extract data from Azure. I am using the Python subprocess library with the Azure CLI commands as they are easier and better documented thank the Python SDK. My question comes whether it is possible to combine the Azure CLI commands with the Python SDK to make the authentication …
Azure Form Recognizer error Atribute error when making the request
I’m trying to follow this document for the form recognizer API, specifically the example for Recognize receipts: I’m trying the following code: And getting this error: The difference I see is that in the example the endpoint and key are called as attributes of a class: But I do not see where does …
How do i use GraphSON v2 instead of v3?
i am trying to run a piece of code in python which uses Cosmos DB from Microsoft Azure. I am currently using gremlinpython 3.2.6 and the latest version of Cosmos (default on microsoft azure) but there seems to be some compatibility issues between the two. When i run my code i get the following error; I have r…
Missing module tensorflow on iPython azure machine learning (Classic)
Yesterday I have install tensorflow module from iPython notebook from Azure machine learning studio (classic) version. The import worked well after installing the module using (!pip install tensorflow). But today when tried to import this module got this “missing module” error and when I tried rei…
How could I list Azure Virtual Machines using Python?
I’ve used the below code to get the Access Token from my Azure account. https://github.com/AzureAD/azure-activedirectory-library-for-python/blob/dev/sample/certificate_credentials_sample.py It’s working fine, I already got the token. However, how can I use this token to list all VMs running in that subscripti…
Python Azure Data Factory Update Pipeline
I want to use Python to add an activity to a pipeline in Azure Data Factory. With the following code I am replacing the actual activity but not adding a new one: This is the pipeline before running the code : After running the code: Expected : Answer Researched the statements in source code: So when you updat…