Auths Python SDK
Decentralized identity for developers and AI agents. Sign, verify, and manage cryptographic identities with Git-native storage.
Install
pip install auths
Quick start
from auths import Auths
auths = Auths()
# Verify an attestation
result = auths.verify(attestation_json=data, issuer_key=public_key_hex)
print(result.valid) # True
# Sign bytes
signature = auths.sign(b"hello world", private_key=secret_key_hex)
Identity management
from auths import Auths
auths = Auths(repo_path="~/.auths")
# Create a cryptographic identity
identity = auths.identities.create(label="laptop")
print(identity.did) # did:keri:EBfd...
# Provision an agent (for CI, MCP servers, etc.)
agent = auths.identities.provision_agent(
identity.did,
name="deploy-bot",
capabilities=["sign"],
)
# Sign using the keychain-stored identity key
sig = auths.sign_as(b"hello world", identity=identity.did)
# Link and manage devices
device = auths.devices.link(identity_did=identity.did, capabilities=["sign"])
auths.devices.revoke(device.did, identity_did=identity.did, note="replaced")
Keyless service-to-service verify
Verify an agent's credential presentation offline against a pinned root — one call, a
typed Status enum, no exception for a denial:
from auths import verify_presentation, PresentationStatus
report = verify_presentation(bundle_json) # the Auths-Presentation request bundle
if report.status is not PresentationStatus.VALID:
raise PermissionError(f"denied: {report.status}") # WRONG_AUDIENCE, EXPIRED, …
print(report.subject, report.caps) # granted holder + capabilities
verify_credential(bundle_json) returns a CredentialReport the same way — e.g.
report.status is CredentialStatus.CREDENTIAL_REVOKED carries report.revoked_at. Malformed
input returns a typed MALFORMED_REQUEST status; it never raises.
Git commit verification
from auths.git import verify_commit_range
result = verify_commit_range("HEAD~5..HEAD")
for commit in result.commits:
print(f"{commit.commit_sha}: {'valid' if commit.is_valid else commit.error}")
Time-pinned verification
# Verify an attestation's authenticity at a historical point in time
result = auths.verify(attestation_json=data, issuer_key=key, at="2024-06-15T00:00:00Z")
Capability/role authority is no longer checked at verification time. A capability grant comes from a holder-verified ACDC credential, not the attestation.
Agent auth for MCP / AI frameworks
from auths.agent import AgentAuth
auth = AgentAuth(
bridge_url="https://bridge.example.com",
attestation_chain_path=".auths/agent-chain.json",
)
token = auth.get_token(capabilities=["read", "write"])
Error handling
from auths import Auths, VerificationError, NetworkError
auths = Auths()
try:
result = auths.verify(attestation_json=data, issuer_key=key)
except VerificationError as e:
print(e.code) # "expired_attestation"
print(e.message) # "Attestation expired at 2024-01-15T..."
except NetworkError as e:
if e.should_retry:
pass # safe to retry
All errors inherit from AuthsError and carry .code, .message, and .context.
Configuration
# Auto-discover (uses ~/.auths)
auths = Auths()
# Explicit repo path
auths = Auths(repo_path="/path/to/identity-repo")
# With passphrase (or set AUTHS_PASSPHRASE env var)
auths = Auths(passphrase="my-secret")
# Headless / CI mode
# Set AUTHS_KEYCHAIN_BACKEND=file for environments without a system keychain
API reference
Type stubs are bundled (py.typed + __init__.pyi). Your editor will show full signatures, docstrings, and return types for all methods.
License
Apache-2.0
Metadata
Release files for auths 0.1.16
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| auths-0.1.16.tar.gz | 1.9 MB | Details |
Built distributions (wheels)
| File | Reset | |||
|---|---|---|---|---|
| auths-0.1.16-cp38-abi3-win_amd64.whl | CPython 3.8 | abi3 | Windows x86-64 | Details |
| auths-0.1.16-cp38-abi3-musllinux_1_2_x86_64.whl | CPython 3.8 | abi3 | Linux musl 1.2+ x86-64 | Details |
| auths-0.1.16-cp38-abi3-musllinux_1_2_aarch64.whl | CPython 3.8 | abi3 | Linux musl 1.2+ ARM64 | Details |
| auths-0.1.16-cp38-abi3-manylinux_2_28_x86_64.whl | CPython 3.8 | abi3 | Linux glibc 2.28+ x86-64 | Details |
| auths-0.1.16-cp38-abi3-manylinux_2_28_aarch64.whl | CPython 3.8 | abi3 | Linux glibc 2.28+ ARM64 | Details |
| auths-0.1.16-cp38-abi3-macosx_10_12_x86_64.macosx_11_0_arm64.macosx_10_12_universal2.whl | CPython 3.8 | abi3 | macOS 10.12+ x86-64, macOS 11.0+ ARM64, macOS 10.12+ universal2 (ARM64, x86-64) | Details |
Total release size: 57.5 MB
Release files / auths-0.1.16.tar.gz
| Download URL | auths-0.1.16.tar.gz |
|---|---|
| Size | 1.9 MB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
cb33655c8d757d85b2ed6df0aa1cf997f88fb53d38e66cf284f85df162c0dd00
|
|
BLAKE2b-256 checksum How to use checksums |
11bb7fae311e7deb9948eea7e50482268329e24a34178689983260043d132c1c
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.13
|
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 Jul 21, 2026.
Transparency logRelease files / auths-0.1.16-cp38-abi3-win_amd64.whl
| Download URL | auths-0.1.16-cp38-abi3-win_amd64.whl |
|---|---|
| Size | 8.2 MB |
| Tags | CPython 3.8 Windows x86-64 abi3 |
|
SHA-256 checksum How to use checksums |
3bec809ca4eddd7d9bcd6bca01a494de6f92786fdcc1f17cb4f962d7b642e818
|
|
BLAKE2b-256 checksum How to use checksums |
118dda70b28ffddffb18ae35a2c2049c540b1dbc0a4bd15680cf1f28c87162bc
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.13
|
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 Jul 21, 2026.
Transparency logRelease files / auths-0.1.16-cp38-abi3-musllinux_1_2_x86_64.whl
| Download URL | auths-0.1.16-cp38-abi3-musllinux_1_2_x86_64.whl |
|---|---|
| Size | 8.4 MB |
| Tags | CPython 3.8 Linux musl 1.2+ x86-64 abi3 |
|
SHA-256 checksum How to use checksums |
a8fdb346ced1217bf01a7be7827718d5607b595c28f5a533a12013c7bba8858c
|
|
BLAKE2b-256 checksum How to use checksums |
097a02cd1705247a469b0ed7e12104a87a34532493d47f08c54140947787660b
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.13
|
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 Jul 21, 2026.
Transparency logRelease files / auths-0.1.16-cp38-abi3-musllinux_1_2_aarch64.whl
| Download URL | auths-0.1.16-cp38-abi3-musllinux_1_2_aarch64.whl |
|---|---|
| Size | 7.8 MB |
| Tags | CPython 3.8 Linux musl 1.2+ ARM64 abi3 |
|
SHA-256 checksum How to use checksums |
c9b86128abbfc0e080ad197f4693a95f3085b4374112d733c84cdf8fab6fd781
|
|
BLAKE2b-256 checksum How to use checksums |
83584b74aec526186745db399bb2cff06f3077828f19bb81b9c13354761d40af
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.13
|
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 Jul 21, 2026.
Transparency logRelease files / auths-0.1.16-cp38-abi3-manylinux_2_28_x86_64.whl
| Download URL | auths-0.1.16-cp38-abi3-manylinux_2_28_x86_64.whl |
|---|---|
| Size | 8.4 MB |
| Tags | CPython 3.8 Linux glibc 2.28+ x86-64 abi3 |
|
SHA-256 checksum How to use checksums |
c4d1e58b25816e15cb0ee41477d4c1782c7cadae7dbc573f85634cd16cd3300e
|
|
BLAKE2b-256 checksum How to use checksums |
7d6f5e3d493aec9234f088e6586a9e1d53f16c29ddc27739db93ce86a9767329
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.13
|
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 Jul 21, 2026.
Transparency logRelease files / auths-0.1.16-cp38-abi3-manylinux_2_28_aarch64.whl
| Download URL | auths-0.1.16-cp38-abi3-manylinux_2_28_aarch64.whl |
|---|---|
| Size | 7.8 MB |
| Tags | CPython 3.8 Linux glibc 2.28+ ARM64 abi3 |
|
SHA-256 checksum How to use checksums |
79ccb0ecd21e4c7737137665f6345fe24bdd6f55906b681d47d779afac4c9718
|
|
BLAKE2b-256 checksum How to use checksums |
82b8a1372832619972e695fbfaa50aacdd11aff7dc53c6d987acf767e1174581
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.13
|
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 Jul 21, 2026.
Transparency logRelease files / auths-0.1.16-cp38-abi3-macosx_10_12_x86_64.macosx_11_0_arm64.macosx_10_12_universal2.whl
| Download URL | auths-0.1.16-cp38-abi3-macosx_10_12_x86_64.macosx_11_0_arm64.macosx_10_12_universal2.whl |
|---|---|
| Size | 15.0 MB |
| Tags | CPython 3.8 abi3 macOS 10.12+ universal2 (ARM64, x86-64) macOS 10.12+ x86-64 macOS 11.0+ ARM64 |
|
SHA-256 checksum How to use checksums |
0c743a2303feb35f3ddd3c9e645772303b8a48db63d4d86f10625475a7bd0454
|
|
BLAKE2b-256 checksum How to use checksums |
a75e142e43aa4e953558f7c2688e9fe8d93c9c99d366f60619fbe49f0ef377bf
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.13
|
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 Jul 21, 2026.
Transparency log