Skip to main content
Pre-release

This release is a pre-release and may not be stable for production use.

winwin-vault

PyPI version License

A read-only Python client for HashiCorp Vault, with automatic token renewal and dynamic secret caching.

Installation

pip install winwin-vault

Quick Start

from winwin_vault import VaultClient

# Uses VAULT_ADDR and auth method from environment
client = VaultClient.from_env()

# Read a KV v2 secret
secret = client.read_kv("config")
print(secret["api_key"])

# Read database credentials (cached with TTL)
creds = client.read_database_creds("my-role")
print(creds.username, creds.password)

# Read Alicloud STS credentials (cached with TTL)
alicreds = client.read_alicloud_creds("my-role")
print(alicreds.access_key, alicreds.secret_key, alicreds.security_token)

Authentication

VaultClient.from_env() auto-detects the auth method:

Environment Auth Method
VAULT_TOKEN set EnvTokenAuth
~/.vault-token present EnvTokenAuth
Kubernetes ServiceAccount KubernetesAuth
Vault Agent socket VaultAgentAuth

TLS is enforced for all auth methods except VaultAgentAuth (which communicates over a local Unix socket).

Mount Points

Default mount points:

  • KV v2: secret
  • Database: database
  • Alicloud: alicloud

Change via setters:

client.set_kv_mount_point("internal")
client.set_database_mount_point("database")
client.set_alicloud_mount_point("alicloud")

Exception Handling

from winwin_vault import VaultClient, VaultClientError, VaultSecretNotFoundError

try:
    secret = client.read_kv("config")
except VaultSecretNotFoundError:
    print("Secret not found")
except VaultClientError as e:
    print(f"Vault error: {e}")

License

MIT License — see LICENSE file to be added.

Metadata

Release files for winwin-vault 0.1.9rc3

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for winwin-vault 0.1.9rc3
File Size Uploaded Provenance Actions
winwin_vault-0.1.9rc3.tar.gz 10.2 kB Without provenance Details for winwin_vault-0.1.9rc3.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for winwin-vault 0.1.9rc3
File Interpreter ABI Platform Actions
winwin_vault-0.1.9rc3-py3-none-any.whl Python 3 none any Details for winwin_vault-0.1.9rc3-py3-none-any.whl

Total release size: 23.0 kB

Release files / winwin_vault-0.1.9rc3.tar.gz

Download URL winwin_vault-0.1.9rc3.tar.gz
Size 10.2 kB
Tags Source
SHA-256 checksum
How to use checksums
42ae3a00a43ae60c0ef9c9b4ccd39951b5c71c4c3de9e2a2938976523bf15f94
BLAKE2b-256 checksum
How to use checksums
fd2f4ccf112959e4034aced52a0a906ec698470f652bd7f949ee97caf0c77dc3
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.11.6 {"installer":{"name":"uv","version":"0.11.6","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"26.04","id":"resolute","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

Release files / winwin_vault-0.1.9rc3-py3-none-any.whl

Download URL winwin_vault-0.1.9rc3-py3-none-any.whl
Size 12.8 kB
Tags Python 3
SHA-256 checksum
How to use checksums
b0d710145fead75be01078bb6bb6f9bba8b29804f870fb62c76373fb7ccf49ad
BLAKE2b-256 checksum
How to use checksums
4156b52caabc879e4595e062c762927be6b52498b6278b43b9c5cb9ec267ad1e
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.11.6 {"installer":{"name":"uv","version":"0.11.6","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"26.04","id":"resolute","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

Security for winwin-vault 0.1.9rc3

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.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page