Read-only Azure DevOps API client and Pydantic models. OSS library shared by ado-scanner and Shyftport engines.
Project description
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 viaasync with ADOServerClient(...)) by probing/_apis/connectionDatawith 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.
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 ado_source_core-0.3.0.tar.gz.
File metadata
- Download URL: ado_source_core-0.3.0.tar.gz
- Upload date:
- Size: 176.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
47b8fae0e5bb92a663aa687b553851df9fc24e6244ff8b2fbb31f586415f0db9
|
|
| MD5 |
05fb0d250bcf9f601d880eb92164d57b
|
|
| BLAKE2b-256 |
b6f355d11f73e9cfabc43c99b127d4d430e48bfee5b71d3712b44b936116f5e8
|
Provenance
The following attestation bundles were made for ado_source_core-0.3.0.tar.gz:
Publisher:
release.yml on n8group-oss/ado-source-core
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
ado_source_core-0.3.0.tar.gz -
Subject digest:
47b8fae0e5bb92a663aa687b553851df9fc24e6244ff8b2fbb31f586415f0db9 - Sigstore transparency entry: 1555000387
- Sigstore integration time:
-
Permalink:
n8group-oss/ado-source-core@9788265c9c5ba327b5dc47fad26f7768dd875ba7 -
Branch / Tag:
refs/tags/v0.3.0 - Owner: https://github.com/n8group-oss
-
Access:
private
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@9788265c9c5ba327b5dc47fad26f7768dd875ba7 -
Trigger Event:
push
-
Statement type:
File details
Details for the file ado_source_core-0.3.0-py3-none-any.whl.
File metadata
- Download URL: ado_source_core-0.3.0-py3-none-any.whl
- Upload date:
- Size: 58.9 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
ae2c4beb25ba441ea722d5acf29324cf6618cbe7c2dfbc5d2c7fe65ebe5da0d5
|
|
| MD5 |
334143f821162a202ebb02d68c80b7ec
|
|
| BLAKE2b-256 |
aff60ce67ce60fa7376b6d3afbb3f0f3945d14c12197f0d9c6df8711d4b947da
|
Provenance
The following attestation bundles were made for ado_source_core-0.3.0-py3-none-any.whl:
Publisher:
release.yml on n8group-oss/ado-source-core
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
ado_source_core-0.3.0-py3-none-any.whl -
Subject digest:
ae2c4beb25ba441ea722d5acf29324cf6618cbe7c2dfbc5d2c7fe65ebe5da0d5 - Sigstore transparency entry: 1555000395
- Sigstore integration time:
-
Permalink:
n8group-oss/ado-source-core@9788265c9c5ba327b5dc47fad26f7768dd875ba7 -
Branch / Tag:
refs/tags/v0.3.0 - Owner: https://github.com/n8group-oss
-
Access:
private
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@9788265c9c5ba327b5dc47fad26f7768dd875ba7 -
Trigger Event:
push
-
Statement type: