Skip to content
Advertisement

Tag: azure

I want to extract all the values that a class object holds

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 ‘azure.mgmt.compute.v2019_07_01.models._models_py3.VirtualMachine’> and extract but in the next iteration it fails. For example let’s consider vm to be an

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_name=”Container”,blob_name=”Folder1/Folder2/Folder3″).exists() It always returns False irrespective of folder exists or not. Can anybody tell

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 I do not want to spam Azure with

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 as the CLI uses interactive login

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 read that I

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 reinstalling the module it works well. Am I missing anything here? Do I need to

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 subscription/resource group with Azure SDK for Python? I guess that Microsoft documentation is a bit confusing. Thanks. Answer You can use the function

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 update the pipeline,

Advertisement