Skip to main content

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

PyPI Status Python Version License Read the Docs Tests Coverage Ruff uv

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.

Typing SVG


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. skip and top are handled internally.
  • Pythonic convenience methods — common workflows are first-class citizens. Iterate all commits on a branch with a for loop. 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


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


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

pyado-0.3.3.tar.gz (50.3 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

pyado-0.3.3-py3-none-any.whl (60.7 kB view details)

Uploaded Python 3

File details

Details for the file pyado-0.3.3.tar.gz.

File metadata

  • Download URL: pyado-0.3.3.tar.gz
  • Upload date:
  • Size: 50.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.13

File hashes

Hashes for pyado-0.3.3.tar.gz
Algorithm Hash digest
SHA256 838140cb9412b757228d7a9ec9f9bf267abb3dcda3078743e52207690ffdd468
MD5 9914cb99812adfca828485031390c2ae
BLAKE2b-256 9531934658983267935eac16c6356b48c1e876771d10a65ba8d9e2b243ea98a8

See more details on using hashes here.

Provenance

The following attestation bundles were made for pyado-0.3.3.tar.gz:

Publisher: release.yml on FredStober/pyado

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file pyado-0.3.3-py3-none-any.whl.

File metadata

  • Download URL: pyado-0.3.3-py3-none-any.whl
  • Upload date:
  • Size: 60.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.13

File hashes

Hashes for pyado-0.3.3-py3-none-any.whl
Algorithm Hash digest
SHA256 b11cf01adf731252bd4ac93e5b0174c9be639c0cddaf4b26bd88cdb34da45d46
MD5 0368e1565773a7c93ff0a4f45d20e63a
BLAKE2b-256 ce286287d02b63b3782ca90696d203d9a90c39907d411ca54ccfc30704557356

See more details on using hashes here.

Provenance

The following attestation bundles were made for pyado-0.3.3-py3-none-any.whl:

Publisher: release.yml on FredStober/pyado

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page