secretcarousel
Python SDK for SecretCarousel — the secret vault your coding agents run themselves. Store, rotate, and hand off credentials from any Python agent, so they stop passing keys in plain text.
Install
pip install secretcarousel
Quick Start
from secretcarousel import SecretCarouselClient
sc = SecretCarouselClient(api_key="sc_...")
# Store a secret — AES-256-GCM encrypted at rest; returns an id, never echoes the value
secret = sc.create_secret(
"DATABASE_URL",
"postgres://user:pass@host/db",
secret_type="database-credentials",
)
# Retrieve by id — decrypted on demand, access-logged
result = sc.get_secret(secret["secretId"])
print(result["value"])
# List / search — ids + names, never values
sc.list_secrets()
sc.search_secrets("stripe")
# Rotate now
sc.rotate_secret(secret["secretId"])
Self-provision — no key, no human
An agent can bootstrap its own vault mid-session:
sc = SecretCarouselClient.signup("my-project")
print(sc.api_key) # save this — shown once
Claim tokens — hand a secret to another agent
Mint a one-time, scoped, expiring token; another agent — different project, even different company — redeems it exactly once, and the token burns. The plain-text value never crosses the boundary as a copy-pasteable string, and every mint/redeem lands in the audit trail.
# Agent A: hand a secret to another tenant/agent
token = sc.create_claim(
"<the-secret-value>",
target_tenant_id="partner-tenant",
contract_id="CTR-ID",
)
# Agent B: redeem the token you were handed (once, audited)
sc.redeem_claim(token["token"])
# List the tokens you've minted + their status
sc.list_claims()
Sharing — time- and view-limited links for humans
share = sc.create_share(secret["secretId"], expiration_hours=1, max_uses=1)
sc.list_shares()
Environments — .env in, .env out
sc.export_env(env="production")
sc.promote_secrets(from_env="staging", to_env="production")
Features
- Zero dependencies — stdlib
urllibonly - Full type hints — mypy compatible, ships
py.typed - Secrets — store, retrieve, update, delete; AES-256-GCM at rest; typed
- Claim tokens — one-time, scoped, expiring, audited cross-tenant handoff
- Sharing — time- and view-limited links
- Rotation — rotate now or check schedule/status
- Environments — export as
.env, promote between environments - Audit trail — immutable event log, exportable as CSV
- Agent self-signup — provision a vault with no key and no human
API
| Method | Description |
|---|---|
SecretCarouselClient.signup(tenant_id) |
Self-provision a vault, returns an authenticated client |
list_secrets(**query) |
List secrets (metadata only) |
search_secrets(q, **query) |
Search by name/tag/description |
get_secret(id) |
Get a secret with decrypted value |
create_secret(name, value, secret_type=None, **extra) |
Create a secret |
update_secret(id, **data) |
Update (creates a new version) |
delete_secret(id) |
Delete a secret |
rotate_secret(id, **options) |
Rotate now |
get_rotation_status(id) |
Rotation schedule + status |
create_share(secret_id, expiration_hours=None, max_uses=None) |
Create a share link |
list_shares(**query) / get_share(id) |
List / get shares |
revoke_share(id) / extend_share(id, **data) |
Revoke / extend a share |
access_share(token) |
Redeem a share link (consumes a view) |
create_claim(secret_value, target_tenant_id, contract_id, ...) |
Mint a claim token |
redeem_claim(token) |
Redeem a claim token (once, audited) |
list_claims(**query) / get_claim(id) / revoke_claim(id) |
Manage claim tokens |
export_env(**query) / promote_secrets(**data) |
Environment import/export |
get_audit_logs(**query) / export_audit_csv(**query) |
Audit trail |
create_backup(**data) / list_backups(**query) |
Backups |
All list/query methods accept keyword filters (e.g. sc.list_secrets(limit=50)).
Non-2xx responses raise a typed SecretCarouselError subclass
(AuthenticationError, ForbiddenError, NotFoundError, ValidationError).
Links
- Quick Start: https://secretcarousel.com/docs/quickstart.html
- API Reference: https://secretcarousel.com/api
- CLI: https://www.npmjs.com/package/secretcarousel
License
Proprietary — Tyga.Cloud Ltd. See LICENSE file.
Metadata
Release files for secretcarousel 2.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 | |
|---|---|---|---|---|
| secretcarousel-2.0.0.tar.gz | 8.7 kB | Without provenance | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| secretcarousel-2.0.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 17.4 kB
Release files / secretcarousel-2.0.0.tar.gz
| Download URL | secretcarousel-2.0.0.tar.gz |
|---|---|
| Size | 8.7 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
3926ad521f8d56310504dc2c57b25735ec470449df5593fbe019574402f8b034
|
|
BLAKE2b-256 checksum How to use checksums |
6a130f084370cd2368cfb88924164170dd86c5daa7fdaaf84196a1775dad5123
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.11.7 {"installer":{"name":"uv","version":"0.11.7","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"macOS","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}
|
Release files / secretcarousel-2.0.0-py3-none-any.whl
| Download URL | secretcarousel-2.0.0-py3-none-any.whl |
|---|---|
| Size | 8.7 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
2e6eac5f97e44b5f7680184ad55c405514e97d0e1c13711e91cd10d7ca0845ff
|
|
BLAKE2b-256 checksum How to use checksums |
9dbac0b6c60bd200c55e8c467895b7dcec238cd40926be3b5dbba3b60421763c
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.11.7 {"installer":{"name":"uv","version":"0.11.7","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"macOS","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}
|
Security for secretcarousel 2.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.