https://github.com/nathanvaughn/poetry-azure-artifacts-plugin
Poetry plugin to handle Azure Artifacts authentication
https://github.com/nathanvaughn/poetry-azure-artifacts-plugin
azure-artifacts azure-devops poetry-plugin
Last synced: 4 months ago
JSON representation
Poetry plugin to handle Azure Artifacts authentication
- Host: GitHub
- URL: https://github.com/nathanvaughn/poetry-azure-artifacts-plugin
- Owner: NathanVaughn
- License: mit
- Created: 2024-08-06T22:14:14.000Z (almost 2 years ago)
- Default Branch: main
- Last Pushed: 2026-01-01T12:57:55.000Z (6 months ago)
- Last Synced: 2026-01-06T13:18:15.300Z (5 months ago)
- Topics: azure-artifacts, azure-devops, poetry-plugin
- Language: Python
- Homepage: https://pypi.org/project/poetry-azure-artifacts-plugin
- Size: 203 KB
- Stars: 2
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Poetry Azure Artifacts Plugin
[](https://github.com/astral-sh/ruff)
[](https://github.com/pre-commit/pre-commit)
[](https://github.com/NathanVaughn/poetry-azure-artifacts-plugin/blob/main/LICENSE)
[](https://pypi.org/project/poetry-azure-artifacts-plugin)
[](https://pypi.org/project/poetry-azure-artifacts-plugin)
---
This is a [Poetry](https://python-poetry.org/) plugin that transparently takes
care of authentication with Azure Artifacts feeds. This is heavily based on
[semgrep/poetry-codeartifact-plugin](https://github.com/semgrep/poetry-codeartifact-plugin).
## Usage
This plugin requires Python 3.9+ which is a bit less lenient than Poetry itself.
Install this plugin with
```bash
poetry self add poetry-azure-artifacts-plugin
```
or
```bash
pipx inject poetry poetry-azure-artifacts-plugin
```
In your `pyproject.toml` file, add your Azure Artifacts feed URL as a source.
```toml
[[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](https://github.com/microsoft/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`:
```toml
[[tool.poetry.source]]
name = "azure-artifacts-feed"
url = "https://devops.mydomain.com/{organization}/_packaging/{feed}/pypi/simple/"
priority = "primary"
```
## Development
Use the provided [devcontainer](https://containers.dev/)
or run the following for local development:
```bash
# Install uv
# https://docs.astral.sh/uv/getting-started/installation/
uv tool install vscode-task-runner
vtr install
```