Azure DevOps Python API
Перейти к файлу
Ted Chambers c3c71cc3b0 Merge pull request #39 from Microsoft/users/tedchamb/regen
generate new 4.0 and 4.1 REST Areas at M127, and update resource ids
2018-01-20 13:44:56 -05:00
scripts fix version replace to not append .DRAFT for draft builds. 2017-10-27 12:49:00 -04:00
vsts generate 3 new 4.0 REST Areas, and update resource ids 2018-01-20 13:41:07 -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 add pip install command 2018-01-20 10:01:15 -05:00

README.md

Visual Studio Team services Python

Microsoft Visual Studio Team Services Python API

This repository contains Microsoft Visual Studio Team Services Python API. This API is used to build the Visual Studio Team Services CLI. To learn more about the VSTS CLI, check out our github repo.

Installation

pip install vsts

Getting Started

Following is an example how to use the API directly:

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

token='REDACTED'
team_instance='https://REDACTED.visualstudio.com'

credentials = BasicAuthentication('', token)
connection = VssConnection(base_url=team_instance, creds=credentials)
core_client = connection.get_client('vsts.core.v4_0.core_client.CoreClient')

team_projects = core_client.get_projects()

for project in team_projects:
    pprint.pprint(project.__dict__)

VSTS REST API Documentation

The python SDK is a thin wrapper around the VSTS REST APIs. Please consult our REST API documentation for API specific details while working with this python SDK.

VSTS REST API Documentation

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.