vallkey
Send any Python SDK through Vallkey with no code changes.
Vallkey gives you ghost keys: stand-in API keys that only work within your rules, and that you can kill in one click. This package sends every request that carries a ghost key to Vallkey instead of the provider, with the same path, so you do not need to set a base URL in any SDK. Requests without a ghost key are not touched.
pip install vallkey
Then either set an environment variable, with no change to your code:
VALLKEY_AUTO=1 python app.py
or import it once, anywhere in your code:
import vallkey.auto
Put your ghost key where the real key was (for example OPENAI_API_KEY=gk_openai_...) and use the SDK as usual:
from openai import OpenAI
client = OpenAI() # no base_url needed
It covers httpx and httpx2 (OpenAI, Anthropic and most new SDKs), requests (Stripe, Twilio and most others), aiohttp and urllib. Libraries imported later are covered too, so the order of imports does not matter.
| Variable | |
|---|---|
VALLKEY_AUTO=1 |
Turns it on when Python starts, without an import |
VALLKEY_API |
The Vallkey server, if not https://api.vallkey.com |
VALLKEY_DEBUG=1 |
Logs each request sent to Vallkey (never the key) |
To set up ghost keys from your .env files, use the command line tool: npx vallkey init.
Metadata
Release files for vallkey 0.1.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 | |
|---|---|---|---|---|
| vallkey-0.1.0.tar.gz | 7.8 kB | Without provenance | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| vallkey-0.1.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 14.9 kB
Release files / vallkey-0.1.0.tar.gz
| Download URL | vallkey-0.1.0.tar.gz |
|---|---|
| Size | 7.8 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
73e0468f0d958a8e31880ae5e8598c0d8fb39dfe0a87c3c1034f98d4b6d822f9
|
|
BLAKE2b-256 checksum How to use checksums |
2c3b9529312baecbefa90bf284cae94a1fb224d38cb3bf7bfee5d4221207eca8
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.12.9
|
Release files / vallkey-0.1.0-py3-none-any.whl
| Download URL | vallkey-0.1.0-py3-none-any.whl |
|---|---|
| Size | 7.1 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
d84848cab4f3d9954e3f3b5a10354ef95bbe0108a829d09e15221f6ae24bb007
|
|
BLAKE2b-256 checksum How to use checksums |
35e8725f9d18a6df142575630e1de9fb5f8c444c1f031d579ce933b1571c2a55
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.12.9
|
Security for vallkey 0.1.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.