All Projects → microsoft → Azure Devops Python Samples

microsoft / Azure Devops Python Samples

Licence: mit
Python samples for interacting with and managing Azure DevOps

Programming Languages

python
139335 projects - #7 most used programming language

Projects that are alternatives of or similar to Azure Devops Python Samples

Free Api
收集免费的接口服务,做一个api的搬运工
Stars: ✭ 11,365 (+16613.24%)
Mutual labels:  api
Acf To Rest Api
Exposes Advanced Custom Fields Endpoints in the WordPress REST API
Stars: ✭ 1,152 (+1594.12%)
Mutual labels:  api
Directus Docker
Directus 6 Docker — Legacy Container [EOL]
Stars: ✭ 68 (+0%)
Mutual labels:  api
Component Api
Component API 组件API、开源,免费使用。
Stars: ✭ 67 (-1.47%)
Mutual labels:  api
Base
Base is the foundation for creating modular, unit testable and highly pluggable, server-side node.js applications.
Stars: ✭ 67 (-1.47%)
Mutual labels:  api
Xxamarin
Repositório com ✨ 141 Exemplos de Implementações e 📦 13 Pacotes de Xamarin
Stars: ✭ 68 (+0%)
Mutual labels:  samples
Spacex Api
🚀 Open Source REST API for SpaceX launch, rocket, core, capsule, starlink, launchpad, and landing pad data.
Stars: ✭ 8,973 (+13095.59%)
Mutual labels:  api
Wise Old Man
The Open Source Old School Runescape progress tracker.
Stars: ✭ 68 (+0%)
Mutual labels:  api
Katt
KATT (Klarna API Testing Tool) is an HTTP-based API testing tool for Erlang.
Stars: ✭ 67 (-1.47%)
Mutual labels:  api
Auth0 Express Api Samples
Auth0 Integration Samples for Node Express REST API Services
Stars: ✭ 68 (+0%)
Mutual labels:  api
Autohook
Automatically setup and serve webhooks for the Twitter Account Activity API
Stars: ✭ 67 (-1.47%)
Mutual labels:  api
Dreamfactory
DreamFactory API Management Platform
Stars: ✭ 1,148 (+1588.24%)
Mutual labels:  api
Graphql Microservices
Showcasing a graphql microservice setup
Stars: ✭ 68 (+0%)
Mutual labels:  api
Dimscord
A Discord Bot & REST Library for Nim.
Stars: ✭ 67 (-1.47%)
Mutual labels:  api
Mattersend
Library and CLI utility to send messages to mattermost's incoming webhooks
Stars: ✭ 68 (+0%)
Mutual labels:  api
Falcon
The no-nonsense REST API and microservices framework for Python developers, with a focus on reliability, correctness, and performance at scale.
Stars: ✭ 8,654 (+12626.47%)
Mutual labels:  api
Laravel Api Boilerplate Jwt
A Laravel 5.8 API Boilerplate to create a ready-to-use REST API in seconds.
Stars: ✭ 1,155 (+1598.53%)
Mutual labels:  api
Kcd
Continuous Delivery for Kubernetes
Stars: ✭ 69 (+1.47%)
Mutual labels:  api
Apy
Apy is a simple client-side library for making rest api ajax calls.
Stars: ✭ 68 (+0%)
Mutual labels:  api
Ratp Api Rest
This project turnkey is distributed as a middleware to expose RATP realtime data as REST resources
Stars: ✭ 68 (+0%)
Mutual labels:  api

Python samples for Azure DevOps

This repository contains Python samples that show how to integrate with Azure DevOps and Team Foundation Server (TFS) using the Azure DevOps Python API.

As of January 2021, we're no longer actively maintaining this repo. Feel free to continue using it for inspiration or examples. We won't be updating or adding any samples, though.

Explore

Samples are organized by "area" (service) and "resource" within the samples package. Each sample module shows various ways for interacting with Azure DevOps and TFS. Resources may have multiple samples, since there are often multiple ways to query for a given resource.

Installation

  1. Clone this repository and cd into it

  2. Create a virtual environment (python3 -m venv env && . env/bin/activate && pip install -r requirements.txt)

Now you can run runner.py with no arguments to see available options.

Run the samples - command line

VERY IMPORTANT: some samples are destructive! It is recommended that you run these samples against a test organization.

  1. Get a personal access token.

  2. Store the PAT and organization URL you'll be running samples against (note: some samples are destructive, so use a test organization):

    • python runner.py config url --set-to https://dev.azure.com/fabrikam
    • python runner.py config pat --set-to ABC123
    • If you don't want your PAT persisted to a file, you can put it in an environment variable called AZURE_DEVOPS_PAT instead
  3. Run python runner.py run {area} {resource} with the 2 required arguments:

    • {area}: API area (currently core, git, and work_item_tracking) to run the client samples for. Use all to include all areas.
    • {resource}: API resource to run the client samples for. Use all to include all resources.
    • You can optionally pass --url {url} to override your configured URL

Examples

Run all samples

python runner.py run all all

Run all work item tracking samples

python runner.py run work_item_tracking all

Run all Git pull request samples

python runner.py run git pullrequests

Run all Git samples against a different URL than the one configured; in this case, a TFS on-premises collection

python runner.py run git all --url https://mytfs:8080/tfs/testcollection

Save request and response data to a JSON file

To persist the HTTP request/response as JSON for each client sample method that is run, set the --output-path {value} argument. For example:

python runner.py run all all --output-path ~/temp/http-output

This creates a folder for each area, a folder for each resource under the area folder, and a file for each client sample method that was run. The name of the JSON file is determined by the name of the client sample method. For example:

|-- temp
    |-- http-output
        |-- git
            |-- refs
                |-- get_refs.json
                |-- ...
            |-- repositories
                |-- get_repositories.json
                |-- ...

Note: certain HTTP headers like Authorization are removed for security/privacy purposes.

See what samples are available

You can run runner.py list to see what sample areas and resources are available.

Run the samples - Jupyter notebook

We also provide a Jupyter notebook for running the samples. You'll get a web browser where you can enter URL, authentication token, and choose which samples you wish to run.

  1. Clone this repository and cd into it

  2. Create a virtual environment (python3 -m venv env && . env/bin/activate && pip install -r requirements.jupyter.txt)

  3. Get a personal access token.

  4. Run jupyter notebook. In the resulting web browser, click API Samples.ipynb.

  5. Click Run in the top cell. Scroll down and you'll see a form where you can enter your organization or TFS collection URL, PAT, and choose which samples to run.

IMPORTANT: some samples are destructive. It is recommended that you first run the samples against a test account.

Contribute

This repo is no longer maintained, and therefore is not accepting new contributions.

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 [email protected] with any additional questions or comments.

See detailed instructions on how to contribute a sample.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].