Typed, Pydantic-backed wrappers and Pythonic convenience methods for the Azure DevOps REST API
Project description
pyado — Python bindings for the Azure DevOps REST API
Typed, Pydantic-backed wrappers and Pythonic convenience methods for the Azure DevOps REST API — no raw dicts, no string parsing, full IDE completion.
pyado exists to make working with Azure DevOps from Python straightforward and pleasant. Every endpoint is available as a thin, typed wrapper, and on top of that a higher-level layer handles the workflows most applications require: iterating paginated results, constructing multi-part requests, diffing branches, linking work items, and more. Authentication, retries, and content-type negotiation are handled transparently — the focus stays on what your code needs to accomplish.
Quick look
import pyado
api = pyado.ApiCall(
access_token="<your-pat>",
url="https://dev.azure.com/<organisation>/<project>/_apis/",
)
# Query work items with WIQL
refs = pyado.post_wiql(api, "SELECT [System.Id] FROM WorkItems WHERE [System.State] = 'Active'")
for item in pyado.iter_work_item_details(api, [ref.id for ref in refs]):
print(f"#{item.id} {item.fields['System.Title']}")
# Push a file change programmatically
repo_api = pyado.get_repository_api_call(api, repo_id)
result = pyado.push_commits(
repo_api,
ref_updates=[pyado.create_ref_update(repo_api, "main")],
commits=[pyado.make_commit("chore: update config", [
pyado.edit_file("/config/settings.json", '{"key": "value"}'),
])],
)
print(f"Pushed commit {result.commits[0].commit_id}")
# Create a PR and link a work item
pr = pyado.create_pr(
repo_api,
title="Update config",
source_branch="feature/update-config",
target_branch="main",
work_item_ids=[item.id],
)
print(f"PR #{pr.pull_request_id} created")
What you get
- Full type safety — every function accepts and returns Pydantic models. Bad inputs are caught at construction, not buried in an HTTP 400 response.
- No boilerplate — authentication, session management, retries, and content type negotiation are handled for you.
- Automatic pagination — functions that return lists are generators that page
through results transparently.
skipandtopare handled internally. - Pythonic convenience methods — common workflows are first-class citizens.
Iterate all commits on a branch with a
forloop. Create a PR and attach work items in one call. Push file changes without touching git internals. The underlying REST mechanics are abstracted away. - Everything covered — work items, pull requests, repositories, git push, builds, pipeline runs, pipeline task callbacks, variable groups, approvals, projects, and user profiles.
Installation
$ pip install pyado
or with uv:
$ uv add pyado
Requires Python 3.11 and an Azure DevOps personal access token (PAT).
Is pyado right for you?
Microsoft also publishes an official azure-devops Python
package. See the alternatives comparison for a side-by-side
overview to help you decide which package fits your use case.
Further reading
- Full usage guide — every domain with detailed examples
- API reference — auto-generated from docstrings
- Contributor Guide — coding standards, architecture, and how to get started
Contributing
Contributions are very welcome. See the Contributor Guide for details.
License
Distributed under the terms of the MIT license. pyado is free and open source software.
Issues
Please file an issue with a detailed description of the problem.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file pyado-0.3.1.tar.gz.
File metadata
- Download URL: pyado-0.3.1.tar.gz
- Upload date:
- Size: 46.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.11.17 {"installer":{"name":"uv","version":"0.11.17","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Amazon Linux","version":"2023","id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
67660e60261a915d7105f7b3a8b63e706620d5161dc5f91ece39bed5451dcaaf
|
|
| MD5 |
637c83dc3e4df174d7ee87abf504ae4d
|
|
| BLAKE2b-256 |
b5af706c94c7398b5b2c251f34622485cb43be050c9abddc49f98265a1c9b730
|
File details
Details for the file pyado-0.3.1-py3-none-any.whl.
File metadata
- Download URL: pyado-0.3.1-py3-none-any.whl
- Upload date:
- Size: 57.9 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.11.17 {"installer":{"name":"uv","version":"0.11.17","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Amazon Linux","version":"2023","id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
1602dbc548ff22f08926f20c805c382d251e3ab7bb6083e5ee1606d30f50ad7e
|
|
| MD5 |
710ffae9ead7a0fb271815862c6ef7fd
|
|
| BLAKE2b-256 |
28f53dcd4e084ee35cf07c3b1f9e559cdf92704cfeb5fc40fa26e33a561aa143
|