Azure DevOps Python API
Перейти к файлу
Ted Chambers ed4f2ec845 Merge pull request #169 from Microsoft/dev
0.1.25 - Fix for enum references within collections causing deserialization issues
2019-01-15 10:34:21 -05:00
scripts bump version to 0.1.3 and fix dev_setup script 2018-04-23 12:38:27 -04:00
vsts Fix for enum references within collections 2019-01-15 10:19:08 -05:00
.gitattributes update .gitattributes for *.sh files 2017-10-23 14:18:58 -04:00
.gitignore generate M127 release management client 2018-01-10 18:41:29 -05:00
LICENSE Initial commit 2017-10-20 11:00:26 -07:00
README.md Update README.md 2018-10-05 10:46:21 -04:00

README.md

Visual Studio Team services Python

Azure DevOps Python API

This repository contains Python APIs for interacting with and managing Azure DevOps. These APIs power the Visual Studio Team Services CLI. To learn more about the VSTS CLI, visit the Microsoft/vsts-cli repo.

Install

pip install vsts

Get started

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

from vsts.vss_connection import VssConnection
from msrest.authentication import BasicAuthentication
import pprint

# Fill in with your personal access token and org URL
personal_access_token = 'YOURPAT'
organization_url = 'https://dev.azure.com/YOURORG'

# Create a connection to the org
credentials = BasicAuthentication('', personal_access_token)
connection = VssConnection(base_url=organization_url, creds=credentials)

# Get a client (the "core" client provides access to projects, teams, etc)
core_client = connection.get_client('vsts.core.v4_0.core_client.CoreClient')

# Get the list of projects in the org
projects = core_client.get_projects()

# Show details about each project in the console
for project in projects:
    pprint.pprint(project.__dict__)

API documentation

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

Samples

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

Contributing

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

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

This project has adopted the Microsoft Open Source Code of Conduct. For more information see the Code of Conduct FAQ or contact opencode@microsoft.com with any additional questions or comments.