Skip to main content

ado-keyring

A keyring backend in pure python that authenticates to Azure DevOps package feeds using browser-based OAuth2 with PKCE.

Once installed, keyring automatically discovers ado-keyring as a backend. Any tool that uses keyring, such as uv for alternative indexes, will trigger browser auth when accessing Azure DevOps feeds.

Install from PyPi

uv tool install keyring --with ado-keyring

Features

  • Browser-based OAuth2 + PKCE — secure, no secrets stored in config files
  • Persistent token cache — avoids repeated browser prompts (~/.ado-keyring/)
  • Automatic token refresh — uses refresh tokens to silently renew access
  • Per-org session tokens — supports multiple Azure DevOps organizations
  • WSL-aware — opens the Windows browser from WSL via cmd.exe
  • No .NET dependency — pure Python, unlike artifacts-keyring

Install from source

just install

Install on WSL from source

tdnf install -y python3 python3-pip
python3 -m pip install uv
echo 'export PATH="$HOME/.local/bin:$PATH"' >> ~/.bashrc && source ~/.bashrc
uv tool install rust-just
just install

How It Works

  1. Binds a localhost callback server on a random port
  2. Opens the browser to Azure AD's OAuth2 authorize endpoint (PKCE, select_account prompt)
  3. Receives the authorization code via redirect
  4. Exchanges the code for access + refresh tokens
  5. Exchanges the access token for a VssSessionToken scoped to vso.packaging
  6. Caches all tokens to ~/.ado-keyring/token-cache.json (file: 0600, dir: 0700)
  7. On subsequent calls, uses cached session tokens or silently refreshes via the refresh token

License

MIT

Release files for ado-keyring 0.1.2

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-keyring 0.1.2
File Size Uploaded
ado_keyring-0.1.2.tar.gz 39.7 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for ado-keyring 0.1.2
File Interpreter ABI Platform
ado_keyring-0.1.2-py3-none-any.whl Python 3 none any Details

Total release size: 46.8 kB

Release files / ado_keyring-0.1.2.tar.gz

Download URL ado_keyring-0.1.2.tar.gz
Size 39.7 kB
Tags Source
SHA-256 checksum
How to use checksums
24c04e15edd0d6fa299718b2b8f4a27b563b685566a22c62ae63500eb27b27df
BLAKE2b-256 checksum
How to use checksums
b22ddcef737a99f1552ecd7d64fc1eb68364b3f8744c91e4453615d765ed5755
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.7

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 Mar 13, 2026.

Transparency log

Release files / ado_keyring-0.1.2-py3-none-any.whl

Download URL ado_keyring-0.1.2-py3-none-any.whl
Size 7.1 kB
Tags Python 3
SHA-256 checksum
How to use checksums
cfb16a295ce1855ab6383470dca6b7a4b140d2f0f36db28f8bff0e9285117376
BLAKE2b-256 checksum
How to use checksums
2ebd3adac856d2070ac887900a1cc8921eee91e130843d06902ca172f9e686b4
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.7

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 Mar 13, 2026.

Transparency log

Release history Release notifications | RSS feed

This release

0.1.2 This release

2 release files

0.1.1

2 release files

0.1.0

2 release files

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