Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

microsoft/azure-devops-python-api

Repository files navigation

Python packagePython

Azure DevOps Python API

This repository contains Python APIs for interacting with and managing Azure DevOps. These APIs power the Azure DevOps Extension for Azure CLI. To learn more about the Azure DevOps Extension for Azure CLI, visit theMicrosoft/azure-devops-cli-extension repo.

Install

pip install azure-devops

Get started

To use the API, establish a connection using apersonal access token and the URL to your Azure DevOps organization. Then get a client from the connection and make API calls.

fromazure.devops.connectionimportConnectionfrommsrest.authenticationimportBasicAuthenticationimportpprint# Fill in with your personal access token and org URLpersonal_access_token='YOURPAT'organization_url='https://dev.azure.com/YOURORG'# Create a connection to the orgcredentials=BasicAuthentication('',personal_access_token)connection=Connection(base_url=organization_url,creds=credentials)# Get a client (the "core" client provides access to projects, teams, etc)core_client=connection.clients.get_core_client()# Get the first page of projectsget_projects_response=core_client.get_projects()index=0whileget_projects_responseisnotNone:forprojectinget_projects_response.value:pprint.pprint("["+str(index)+"] "+project.name)index+=1ifget_projects_response.continuation_tokenisnotNoneandget_projects_response.continuation_token!="":# Get the next page of projectsget_projects_response=core_client.get_projects(continuation_token=get_projects_response.continuation_token)else:# All projects have been retrievedget_projects_response=None

API documentation

This Python library provides a thin wrapper around the Azure DevOps REST APIs. See theAzure DevOps REST API reference for details on calling different APIs.

Samples

Learn how to call different APIs by viewing the samples in theMicrosoft/azure-devops-python-samples repo.

Contributing

This project welcomes contributions and suggestions. Most contributions require you to agree to aContributor License Agreement (CLA) declaring that you have the right to, and actually do, grant usthe rights to use your contribution. For details, visithttps://cla.microsoft.com.

When you submit a pull request, a CLA-bot will automatically determine whether you need to providea CLA and decorate the PR appropriately (e.g., label, comment). Simply follow the instructionsprovided by the bot. You will only need to do this once across all repos using our CLA.

This project has adopted theMicrosoft Open Source Code of Conduct.For more information see theCode of Conduct FAQ orcontactopencode@microsoft.com with any additional questions or comments.


[8]ページ先頭

©2009-2025 Movatter.jp