azure-devops

Python pytest in Azure DevOps – ModuleNotFoundError: No module named 'core'

Python pytest in Azure DevOps – ModuleNotFoundError: No module named 'core' Question: I have my DevOps pipeline which is using pytest to execute unit tests found in Python code. I’m using a root folder called "core" for the main python functionality, and reference it using the following format: import unittest from core.objects.paragraph import Paragraph from …

Total answers: 2

Extract team members from Azure DevOps via API

Extract team members from Azure DevOps via API Question: i’m trying to make a simple API call from python to azure DevOps: just take the members of a team from an Azure DevOps project using the simple and yet elegant http library called Requests https://pypi.org/project/requests/. Following this documentation from Azure to get the correct API …

Total answers: 2

Unable to fetch OAuth2.0 Token from Azure-DevOps , using Python

Unable to fetch OAuth2.0 Token from Azure-DevOps , using Python Question: I am trying to use OAuth2 to access the Azure DevopsAPI, to query work-items. But I am unable to get the access tokene. I am using Python and Flask. My approach is based on these resources: Microsoft documentation , there currently Step 3 is …

Total answers: 1

Getting Bad request while searching run in mlflow

Getting Bad request while searching run in mlflow Question: Training a ml model with mlflow in azure environment. import mlflow from mlflow import MlflowClient from azureml.core import Experiment, Workspace experiment_name = ‘housing-lin-mlflow’ experiment = Experiment(ws, experiment_name) runs = mlflow.search_runs(experiment_ids=[ experiment.id ]) While fetching runs from search_runs getting this error : RestException: BAD_REQUEST: For input string: …

Total answers: 1

ADO how to read build information from python script started from ADO-agent

ADO how to read build information from python script started from ADO-agent Question: I am building a pipeline in Azure Devops. I have a Yaml file which is starting a python script on a self-hosted agent. Is there any way for me to read information about the pipeline which started the python script inside of …

Total answers: 1

Verify Client ID and Client Secret before using it in Application

Verify Client ID and Client Secret before using it in Application Question: We have a use case in which Admin can set Google Or Microsoft’s Apps Client Id and Secrets that can later be used for all users who sign up with this Admin’s link, Is there a way to verify these fields before saving/using …

Total answers: 1

How can I extract Azure IP ranges json file programatically through python?

How can I extract Azure IP ranges json file programatically through python? Question: I want to download the ipranges.json (which is updated weekly) from https://www.microsoft.com/en-us/download/confirmation.aspx?id=56519 I have this python code which keeps running forever. import wget URL = "https://www.microsoft.com/en-us/download/confirmation.aspx?id=56519" response = wget.download(URL, "ips.json") print(response) How can I download the JSON file in Python? Asked By: …

Total answers: 2

Can I turn off parallel jobs in Azure DevOps pipeline?

Can I turn off parallel jobs in Azure DevOps pipeline? Question: I am new to Azure pipelines. I am trying to create pipeline for deploying simple python application. But I get error No hosted parallelism has been purchased or granted As I understand microsoft disabled the free grant of parallel jobs for public projects and …

Total answers: 2

How to install private python package from Azure Artifact feed via CLI

How to install private python package from Azure Artifact feed via CLI Question: I have setup a pypi feed in Azure Artifacts, but I can’t seem to be able to authenticate via CLI to be able to install the python packages locally. I want to be able to just run pip install and provide the …

Total answers: 2