aps-vault (Python)
Standard-library client for the APS Vault machine API. Python 3.9+, no dependencies.
pip install ./clients/python # or: pip install aps-vault (once published)
import os
from aps_vault import Vault, VaultError
v = Vault("https://vault.example.com", os.environ["VAULT_TOKEN"]) # or Vault.from_env()
try:
dsn_password = v.get("db-password")
smtp = v.get_full("smtp") # {"name","value","login","updated_at",...}
except VaultError as e:
if e.status == 404: ...
get(name)/get_full(name)— cached forcache_ttlseconds (default 300). While the vault is unreachable a stale cached value is returned (fail_open_cache=True) — for at mostmax_staleseconds after it was fetched (default 86400 = 24 h,None= no limit; 0.41.1) — so a vault restart never takes your service down; the first fetch still fails loudly.put(name, value, login=..., tags=..., url=...)— token needscan_write.totp(name)— current 6-digit code, never cached; token needscan_read_totp.list(),health().- Retries 429/5xx/network with 1 s, 2 s, 4 s back-off.
Tokens: pass via environment (VAULT_TOKEN) or a 0600 file (VAULT_TOKEN_FILE). Never
commit one, never log one. Vault refuses anything that does not look like a service token.
Sealed delivery (0.17)
If the token is bound to this application's X25519 public key, values arrive encrypted and the
client decrypts them in-process (needs the optional extra: pip install 'aps-vault[sealed]'):
python -m aps_vault keygen # prints VAULT_CLIENT_KEY (private, keep with the token) and client_public_key (for the token)
python -m aps_vault keygen --gost # GOST R 34.10-2012 pair → the vault seals with VKO + Kuznyechik-MGM; needs pip install 'aps-vault[gost]'
v = Vault(url, token, client_private_key=os.environ["VAULT_CLIENT_KEY"]) # or just set VAULT_CLIENT_KEY
v.get("db-password")
Without the key the client raises VaultError("… sealed values …") rather than returning the
envelope; with the wrong key it says so. See docs/SEALED.md.
Metadata
Release files for aps-vault 0.41.11
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| aps_vault-0.41.11.tar.gz | 18.2 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| aps_vault-0.41.11-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 36.0 kB
Release files / aps_vault-0.41.11.tar.gz
| Download URL | aps_vault-0.41.11.tar.gz |
|---|---|
| Size | 18.2 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
2266b85fdd9a309ac1bcb9b70dda57ee9e3b40fd2c424657038e292c0463c84c
|
|
BLAKE2b-256 checksum How to use checksums |
9c8c3f0c46a279dee152e918ba58776b08d8ccee876c47a95fc8f9c8892f34db
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
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 Oct 8, 2026.
Transparency logRelease files / aps_vault-0.41.11-py3-none-any.whl
| Download URL | aps_vault-0.41.11-py3-none-any.whl |
|---|---|
| Size | 17.8 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
d8e9859b4053ca9701f2328b842fe8de12e3400ea4806e125eb69e4ea8a0d664
|
|
BLAKE2b-256 checksum How to use checksums |
768ad3f8ee8ded3c0a4aafb5221a0fb80986b62786875b8fa47a71cbfad76c0a
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
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 Oct 8, 2026.
Transparency log