Python
The API-Vault Python client allows you to authenticate with an API-Vault server, access secrets, and automatically manage the session.
Installation
pip install requests
Basic Usage
from client import APIVault
vault = APIVault("http://localhost:8080")
vault.login("your-login-key")
secrets = vault.get_secrets()
print(secrets)
vault.logout()
Automatic Logout
You can use APIVault as a context manager. The client will automatically log out when the with block ends.
from client import APIVault
with APIVault("http://localhost:8080") as vault:
vault.login("your-login-key")
secrets = vault.get_secrets()
print(secrets)
This is equivalent to:
vault = APIVault("http://localhost:8080")
vault.login("your-login-key")
try:
secrets = vault.get_secrets()
print(secrets)
finally:
vault.logout()
API
APIVault(base_url)
Creates a client connected to an API-Vault server.
vault = APIVault("http://localhost:8080")
login(key)
Authenticates with the API-Vault server and creates a session.
vault.login("your-login-key")
get_secrets()
Retrieves the secrets available to the authenticated session.
secrets = vault.get_secrets()
print(secrets)
logout()
Terminates the current session.
vault.logout()
Example
from client import APIVault
vault = APIVault("http://localhost:8080")
vault.login("your-login-key")
for secret in vault.get_secrets():
print(secret)
vault.logout()
Security: Never hard-code your API-Vault login key or expose it in source code, public repositories, or logs.
Metadata
Release files for api-vault-sdk 1.0.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| api_vault_sdk-1.0.0.tar.gz | 3.0 kB | Without provenance | Details for api_vault_sdk-1.0.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| api_vault_sdk-1.0.0-py3-none-any.whl | Python 3 | none | any | Details for api_vault_sdk-1.0.0-py3-none-any.whl |
Total release size: 7.4 kB
Release files / api_vault_sdk-1.0.0.tar.gz
| Download URL | api_vault_sdk-1.0.0.tar.gz |
|---|---|
| Size | 3.0 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
cc093839314189d9ac9b102ff99db707373960736d33ba7cabdb59d2e9c1268c
|
|
BLAKE2b-256 checksum How to use checksums |
2e18d88f7c904f742d151dbf949c50726072b8ca00311ddc0a9b3ac1304d9655
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.11.0
|
Release files / api_vault_sdk-1.0.0-py3-none-any.whl
| Download URL | api_vault_sdk-1.0.0-py3-none-any.whl |
|---|---|
| Size | 4.4 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
e17bb704ea6be569dc8e87d054da36746825cbc49d9696ab9225057f1ddae81f
|
|
BLAKE2b-256 checksum How to use checksums |
8879cf62a3c750c0b91f2437ecd17ca47d5af5d6f324490c624c20142320026a
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.11.0
|
Security for api-vault-sdk 1.0.0
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.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.