keyrings.codeartifact
Automatically retrieve credentials for AWS CodeArtifact.
What it is and what it does
keyrings.codeartifact is a keyring backend that bridges AWS CodeArtifact and Python package managers. It extends the keyring library to automatically fetch and inject time-limited AWS access tokens when pip, twine, or other keyring-aware tools attempt to access a private PyPI repository hosted on CodeArtifact. The package reads AWS credentials from ~/.aws/credentials or environment variables and manages token lifecycle transparently.
Once installed, it requires minimal setup: a configuration section in keyringrc.cfg specifying AWS profile, token duration, and optional access keys. It supports both simple single-account setups and advanced multi-account configurations with domain, account, region, and repository name matching to route requests to the correct AWS credentials.
Use it for:
- Publish packages to a private CodeArtifact repository without manually managing temporary tokens.
- Consume packages from CodeArtifact in CI/CD pipelines using pip with automatic credential injection.
- Manage multiple AWS accounts or CodeArtifact repositories with different credential profiles in a single configuration.
- Integrate CodeArtifact authentication into existing pip and twine workflows without script changes.
Worth the install?
AI-flagged interpretation of the facts on this page — verify before relying
Provides AWS CodeArtifact authentication for pip and twine by extending the keyring library to automatically inject time-limited access tokens.
Yes, if you use AWS CodeArtifact for private package distribution. The package is actively maintained, has low install friction, and solves a real authentication problem for CodeArtifact users. The only caveat is the unclear license status—verify it aligns with your project's licensing requirements before committing to it.
Install
keyrings-codeartifact on PyPI
pip
pip install keyrings-codeartifactuv
uv add keyrings-codeartifactpoetry
poetry add keyrings-codeartifactInstalling keyrings.codeartifact
Before you install
Low friction install with two runtime dependencies (keyring and boto3). Actively maintained with a recent commit on 2026-04-27 and regular releases.
License in practice
License status is unclear; the package metadata does not declare an SPDX identifier or raw license text. Verify the license before use in commercial or restricted contexts.
Quickstart
pip install keyrings.codeartifact
Then configure keyring in ~/.keyringrc.cfg:
[codeartifact]
profile_name=default
token_duration=1800
pip install --index-url https://${DOMAIN}-${ACCOUNT}.d.codeartifact.${REGION}.amazonaws.com/pypi/${REPOSITORY}/simple/ mypackage
Requires Python >= 3.9 and AWS credentials configured in ~/.aws/credentials or via environment variables.
Verify before relying
- Whether the unclear license status is a known issue or an oversight in package metadata.
- Specific pip and twine version compatibility requirements for keyring integration.
Package facts
| License | not declared (unclear) |
| Python support | supports the current Python release (>=3.9) |
| Install friction | low — pure-Python wheel |
| Runtime dependencies | 2 — keyring, boto3 |
| Maintenance | actively maintained — 409 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 2,277,849/month — #3,170 on PyPI (30-day window, as of 2026-08-14) |
| Known vulnerabilities | none known (OSV.dev, checked 2026-08-14) |
Evidence: keyrings_codeartifact-2.1.2-py3-none-any.whl
Keywords: aws, codeartifact, keyring
Tags
More Security packages
Provides Python bindings to the FreeDesktop.org…
permissive · top 1,000 on PyPI
msalMSAL for Python handles OAuth2 and OpenID…
permissive · top 1,000 on PyPI
joserfcjoserfc implements JOSE standards (JWS, JWE,…
permissive · top 1,000 on PyPI
AuthlibAuthlib provides a complete implementation of…
permissive · top 1,000 on PyPI
argon2-cffi-bindingsProvides low-level CFFI bindings to the…
permissive · top 1,000 on PyPI
adalADAL for Python authenticates applications with…
permissive · top 1,000 on PyPI
keyrings.google-artifactregistry-authA keyring backend that authenticates to Google…
permissive · top 5,000 on PyPI
artifacts-keyringProvides automatic credential retrieval for…
permissive · top 5,000 on PyPI
aws-requests-authAdds AWS Signature Version 4 authentication to…
permissive · top 1,000 on PyPI
git-remote-codecommitExtends Git to clone and push to AWS CodeCommit…
permissive · top 5,000 on PyPI
keyringKeyring provides safe password and credential…
permissive · top 1,000 on PyPI
botocoreBotocore provides low-level, data-driven access…
permissive · top 100 on PyPI
requests-auth-aws-sigv4Adds AWS Signature Version 4 authentication to…
permissive · top 5,000 on PyPI
keyrings.altProvides alternate keyring backend…
permissive · top 5,000 on PyPI
aws-request-signerSigns HTTP requests using AWS Signature V4,…
permissive · top 15,000 on PyPI
keyrings.cryptfileA keyring backend that stores passwords in an…
permissive · top 15,000 on PyPI