Skip to main content

ado-source-core

Read-only Azure DevOps API client and Pydantic models. OSS library (MIT-licensed) shared by:

  • ado-scanner — standalone discovery CLI
  • Shyftport engines that need to read from Azure DevOps

This library is read-only. It does not perform any writes against Azure DevOps. Migration-side writes live in proprietary code outside this package.

Install

pip install ado-source-core

Quickstart

import asyncio
from ado_source_core import ADOClient, PATAuth

async def main():
    auth = PATAuth(token="your-pat")
    async with ADOClient(organization="myorg", auth=auth) as client:
        async for repo in client.list_repositories(project="MyProject"):
            print(repo.name, repo.default_branch)

asyncio.run(main())

Cloud vs Server

ado-source-core ships two adapters:

  • AzureDevOpsCloudAdapter — for Azure DevOps Services (dev.azure.com/{org}). REST API pinned to 7.1.
  • AzureDevOpsServerAdapter — for self-hosted Azure DevOps Server (the on-prem product, formerly TFS). The REST api-version is auto-discovered when the client connects (await client.connect() or implicitly via async with ADOServerClient(...)) by probing /_apis/connectionData with candidate iteration as a fallback. Construction itself performs no network I/O.

Supported Server versions

Server release REST api-version
Azure DevOps Server 2022 7.0
Azure DevOps Server 2020 6.0
Azure DevOps Server 2019 Update 1+ 5.1
Azure DevOps Server 2019 RTW 5.0

TFS 2018 (REST 4.x) and earlier are out of scope for v0.3.0. Server deployments with PATs disabled at the org-policy level (or NTLM-only deployments behind enterprise SSO) are not supported — PAT support is a hard prerequisite. NTLM/Negotiate auth is a v0.4.0 candidate.

Server quickstart

import asyncio
from ado_source_core import (
    ADOServerClient, AzureDevOpsServerAdapter, PATAuth,
    UnsupportedOnAzureDevOpsServerError,
)

async def main():
    auth = PATAuth(token="your-server-pat")
    async with ADOServerClient(
        base_url="https://devops.example.com:8080/tfs",
        collection="DefaultCollection",
        auth=auth,
    ) as client:
        adapter = AzureDevOpsServerAdapter(client=client)
        caps = await adapter.get_capabilities()
        print(f"Resolved api-version: {caps.api_version}")
        print(f"Notes: {caps.notes}")

        # Always-available calls work the same as on cloud:
        for project in await adapter.list_projects():
            print(project["name"])

        # Optional calls gate on capability flags:
        if caps.supports_graph_api:
            for user in await adapter.list_users():
                print(user.username)
        else:
            print("Graph extension not installed; user listing unavailable.")

        # Capabilities that don't exist on Server raise:
        try:
            await adapter.list_user_entitlements()
        except UnsupportedOnAzureDevOpsServerError as exc:
            print(f"Skipped {exc.capability}: {exc.remediation}")

asyncio.run(main())

Capability matrix

Comprehensive flag-by-flag state across both adapters:

Capability Cloud Server Notes
supports_collections False True Server is collection-scoped; cloud is org-scoped.
supports_pipelines True True Build defs + classic release defs both available.
supports_pull_request_threads True True Available on Server 2019+.
supports_user_entitlements True False (hard) vsaex Member Entitlements API is cloud-only.
supports_graph_api True Probed Requires the Graph extension on Server.
supports_analytics_odata True Probed Auto-installed on Server 2020+; manual install on Server 2019.
supports_artifact_feeds True Probed Requires the Package Management extension on Server.
compatibility_mode False True iff api-version is 5.0 or 5.1 Server 2019 (RTW or Update 1+) — adapter behavior unchanged; flag is informational.

When a probe-resolvable capability is False, the corresponding adapter methods raise UnsupportedOnAzureDevOpsServerError with capability, api_version, and remediation fields populated for downstream discovery reports.

Status

Alpha. Stable enough for ado-scanner consumption; API may change before v1.0.

License

MIT.

Metadata

Release files for ado-source-core 0.3.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for ado-source-core 0.3.0
File Size Uploaded Provenance Actions
ado_source_core-0.3.0.tar.gz 176.7 kB With provenance Details for ado_source_core-0.3.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for ado-source-core 0.3.0
File Interpreter ABI Platform Actions
ado_source_core-0.3.0-py3-none-any.whl Python 3 none any Details for ado_source_core-0.3.0-py3-none-any.whl

Total release size: 235.5 kB

Release files / ado_source_core-0.3.0.tar.gz

Download URL ado_source_core-0.3.0.tar.gz
Size 176.7 kB
Tags Source
SHA-256 checksum
How to use checksums
47b8fae0e5bb92a663aa687b553851df9fc24e6244ff8b2fbb31f586415f0db9
BLAKE2b-256 checksum
How to use checksums
b6f355d11f73e9cfabc43c99b127d4d430e48bfee5b71d3712b44b936116f5e8
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.12

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on May 16, 2026.

Transparency log

Release files / ado_source_core-0.3.0-py3-none-any.whl

Download URL ado_source_core-0.3.0-py3-none-any.whl
Size 58.9 kB
Tags Python 3
SHA-256 checksum
How to use checksums
ae2c4beb25ba441ea722d5acf29324cf6618cbe7c2dfbc5d2c7fe65ebe5da0d5
BLAKE2b-256 checksum
How to use checksums
aff60ce67ce60fa7376b6d3afbb3f0f3945d14c12197f0d9c6df8711d4b947da
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.12

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on May 16, 2026.

Transparency log

Security for ado-source-core 0.3.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

Full provenance

Both files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for ado_source_core-0.3.0.tar.gz

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on May 16, 2026.

Transparency log

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page