spax-secret
spax-secret is a Python client library for reading, writing, and validating secrets through the Sixpetal secret service.
It helps applications keep sensitive values such as API keys, database credentials, and configuration tokens outside source control while still retrieving them securely at runtime.
Install
pip install spax-secret
Quick start
from spax_secret import SecretManager
client = SecretManager(
project="my-project",
enviroment="development",
provider="https://secret.example.com",
)
client.set("API_KEY", "super-secret-value")
print(client.get("API_KEY"))
Features
- Store secret values for a project and environment
- Read single or multiple secrets in one call
- Keep a local in-memory cache for repeated reads
- Verify signed payloads before returning decrypted values
- Use batch helpers for queued writes and reads
Basic usage
Create a client
from spax_secret import SecretManager
client = SecretManager(
project="my-project",
enviroment="production",
provider="https://secret.example.com",
)
Read a secret
api_key = client.get("API_KEY")
print(api_key)
Write a secret
client.set("API_KEY", "new-value")
Read multiple secrets
values = client.get_all(["API_KEY", "DB_HOST", "REDIS_URL"])
for item in values:
print(item.key, item.value)
Dictionary-style access
client["APP_NAME"] = "spax-secret"
print(client["APP_NAME"])
API summary
SecretManager supports the following main operations:
get(key)— fetch one secret valueget_all(keys)— fetch multiple secret valuesset(key, value)— set one secret valueset_all(items)— set multiple secret valuesqueue_get_batch(key)/get_batch_value()— queue and execute read operationsqueue_set_batch(key, value)/set_batch_value()— queue and execute write operations
Notes
- The constructor parameter is named
enviromentin the package source, matching the service contract. - The client expects a remote secret service base URL such as
https://secret.example.com. - Use HTTPS in production and keep secret values out of logs and source control.
- If the backend response has an invalid signature, the client raises a
ValueErrorwhen decrypting a protected value.
Requirements
- Python >= 3.12
httpxpydanticcryptography
License
MIT
Metadata
Release files for spax-secret 1.1.4
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 |
|---|---|---|---|---|
| spax_secret-1.1.4.tar.gz | 10.6 kB | Without provenance | Details for spax_secret-1.1.4.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| spax_secret-1.1.4-py3-none-any.whl | Python 3 | none | any | Details for spax_secret-1.1.4-py3-none-any.whl |
Total release size: 21.3 kB
Release files / spax_secret-1.1.4.tar.gz
| Download URL | spax_secret-1.1.4.tar.gz |
|---|---|
| Size | 10.6 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
81228ec70547c1deb76559cb5da87e7bdb32140918bce190529c6ace62550d7a
|
|
BLAKE2b-256 checksum How to use checksums |
332b2ca0c94239332353d005ace5a76cb6793a71c2e88c337f4947f6544c8e57
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.14.2
|
Release files / spax_secret-1.1.4-py3-none-any.whl
| Download URL | spax_secret-1.1.4-py3-none-any.whl |
|---|---|
| Size | 10.7 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
4b1ea6639d7ce907cc695a53be16ad72d599d1ddbdc111a26e79b20fe89f48b9
|
|
BLAKE2b-256 checksum How to use checksums |
d12e94f67afbc7fe90f463eefcee099026f05dcea509cfe35eb57de046cd3106
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.14.2
|
Security for spax-secret 1.1.4
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.