Install & Compatibility
Where this runs
tested against v0.1.2 · pip install
no network on importno background threads
Install × environment matrix
Each cell = how many times install + import succeeded across repeated harness runs. Partial = flaky.
glibc = Debian/Ubuntu slim · musl = Alpine Linux
muslpy 3.10–3.95 runs
installs and imports cleanly · install 0.0s · import 0.000s · 19.6MB
glibcpy 3.10–3.95 runs
installs and imports cleanly · install 1.7s · import 0.000s · 20MB
18MB installed
● package 18MB
Code
Verified usage
Verified import paths — ran on the pinned version, not inferred.
version
✓ from ansible_sign import version
✗ from ansible_sign import AnsibleSign
Basic usage: sign and verify an Ansible collection tarball using GPG. Requires GPG key to be set up.
from ansible_sign import AnsibleSign
signer = AnsibleSign()
# Sign a collection (requires GPG key in environment)
signer.sign_collection('mycollection-1.0.0.tar.gz', keyid='YOUR_GPG_KEY')
# Verify a signature
result = signer.verify_collection('mycollection-1.0.0.tar.gz.asc')
print(result.valid)
ansible-sign --version
Debug
Known issues
breakingPrior to 0.1.0, the import path was ansible_sign.core; in 0.1.0+ the main class AnsibleSign is exported from the package root. Old imports will break.fixUse from ansible_sign import AnsibleSign instead of from ansible_sign.core import AnsibleSign.
affects: < 0.1.0 -> >= 0.1.0
gotchaBackend ('gpg' vs 'sigstore') must be specified explicitly in some methods; default may not be consistent across all operations.fixAlways pass backend='gpg' or backend='sigstore' to signing/verification methods to ensure expected behavior.
affects: all
gotchaGPG operations require the gnupg Python library and a GPG executable to be installed on the system. Missing gpg binary leads to cryptic errors.fixInstall GPG via system package manager (e.g., sudo apt install gnupg) before using GPG backend.
affects: all
deprecatedThe CLI command 'ansible-sign sign' and 'ansible-sign verify' are still present but may be replaced in future with subcommands under 'ansible-sign collection'.fixUse 'ansible-sign --help' to see current CLI structure; plan to migrate to new subcommand structure if introduced.
affects: <= 0.1.5
Upgrade
Version history
0.1.5latest on PyPI · released Feb 25, 2026
Audit
Dependencies
cryptographyrequiredcrypto operations for GPG and Sigstore
packagingrequiredversion parsing
pyyamlrequiredYAML parsing
sigstorerequiredSigstore signing/verification
gnupgrequiredGPG signing/verification