Skip to main content

Poetry plugin to handle Azure Artifacts authentication

Project description

Poetry Azure Artifacts Plugin

Ruff pre-commit GitHub license PyPi versions PyPi downloads


This is a Poetry plugin that transparently takes care of authentication with Azure Artifacts feeds. This is heavily based on semgrep/poetry-codeartifact-plugin.

Usage

This plugin requires Python 3.9+ which is a bit less lenient than Poetry itself.

Install this plugin with

poetry self add poetry-azure-artifacts-plugin

or

pipx inject poetry poetry-azure-artifacts-plugin

In your pyproject.toml file, add your Azure Artifacts feed URL as a source.

[[tool.poetry.source]]
name = "ado"
url  = "https://pkgs.dev.azure.com/{organization}/_packaging/{feed}/pypi/simple/"
priority = "primary"

Now, when running poetry install, or poetry lock, Poetry will automatically fetch credentials for your Azure Artifacts feed, utilizing artifacts-keyring. Note: artifacts-keyring requires dotnet to be installed and available in your PATH.

This works by recognizing authentication failures to URLs containing pkgs.dev.azure.com or pkgs.visualstudio.com. If you have an on-premises Azure DevOps server that works with artifacts-keyring, instead make the source name include the text azure-artifacts:

[[tool.poetry.source]]
name = "azure-artifacts-feed"
url  = "https://devops.mydomain.com/{organization}/_packaging/{feed}/pypi/simple/"
priority = "primary"

Development

Use the provided devcontainer or run the following for local development:

# Install uv
# https://docs.astral.sh/uv/getting-started/installation/
uv tool install vscode-task-runner
vtr install

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

poetry_azure_artifacts_plugin-0.1.2.tar.gz (55.3 kB view details)

Uploaded Source

Built Distribution

File details

Details for the file poetry_azure_artifacts_plugin-0.1.2.tar.gz.

File metadata

File hashes

Hashes for poetry_azure_artifacts_plugin-0.1.2.tar.gz
Algorithm Hash digest
SHA256 5ae41676cca4610fb4c227c94f2a80dfe2d279f775db05d93107914e591cc87a
MD5 368cf3d710766f8029384ba4355b85c5
BLAKE2b-256 2f4063ab6b54e145353849683199a2091a9c72231e0a5e4988d2cbd71a287d19

See more details on using hashes here.

File details

Details for the file poetry_azure_artifacts_plugin-0.1.2-py3-none-any.whl.

File metadata

File hashes

Hashes for poetry_azure_artifacts_plugin-0.1.2-py3-none-any.whl
Algorithm Hash digest
SHA256 5b4e37a198ce438112344a77d261366073c4fedad637819d0e02456756202f39
MD5 d1ad1992105ebdaa003abc312b63ba30
BLAKE2b-256 13c9ad8888d23407a4c7c1137e009bfb815184174a7e5f1c3fe777f5582d4a74

See more details on using hashes here.

Supported by

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