Ranbval Runtime Blind Decryption Python SDK
Project description
Ranbval Python SDK
A secure, fully Zero-Memory execution wrapper for AI and generic API clients.
Instead of storing plaintext credentials in os.environ, this SDK keeps them completely invisible. It intercepts the client construction, performs a blind PBKDF2 decryption in-memory at runtime, securely passes the decrypted credential only to the relevant library, and immediately purges it.
Quick Start (Pre-Built Clients)
For the most popular SDKs, we offer drop-in replacements. Simply swap your import and let Ranbval handle the encryption boundary without changing your codebase format.
OpenAI
import os
from ranbval_sdk import SecureOpenAI
os.environ["OPENAI_API_KEY"] = "ranbval.xxxxxxxxxx.[BLOB].ahsan"
os.environ["RANBVAL_VAULT_SECRET"] = "your_master_password"
client = SecureOpenAI()
# Uses native standard client methods safely behind the scenes
client.chat.completions.create(model="gpt-4", ...)
Anthropic / Mistral / Supabase
We offer similarly secure blind wrappers for other leading SDKs:
from ranbval_sdk import SecureAnthropic, SecureMistral, SecureSupabase
anthropic_client = SecureAnthropic()
mistral_client = SecureMistral()
Universal Custom Platform Wrapper
If you need to strictly encrypt secrets for an SDK that we don't natively ship (e.g. Stripe, Twilio, or internal APIs), you can use the Universal Integration Engine to wrap ANY Python class dynamically:
from ranbval_sdk import build_secure_client
import stripe
# Generates a Drop-in Secure Proxy for the Stripe SDK dynamically
SecureStripe = build_secure_client(
SDKClass=stripe.StripeClient,
env_var_name="STRIPE_SECRET_KEY",
key_kwarg="api_key"
)
# Completely encrypted in ENV. Handled securely in-memory.
stripe_client = SecureStripe()
Telemetry
Pre-built clients enqueue usage and security metadata to your Ranbval API (POST {RANBVAL_HOST}/api/telemetry) on a background worker thread so model calls are not blocked.
Hosted production (dashboard online)
Use the password-manager origin (default in recent SDK versions: https://ranbval-password-manager.onrender.com). The auth URL is only for login in the browser; telemetry never goes there. Your Ranbval token must come from the same Supabase project as the dashboard, or the server will not attach events to your project.
| Variable | Meaning |
|---|---|
RANBVAL_HOST |
Password-manager origin (no /api suffix). Defaults to the hosted service; set to http://localhost:8006 for local backends. |
RANBVAL_TELEMETRY |
0, false, off — disable telemetry entirely |
RANBVAL_TELEMETRY_DEBUG |
1 / true — print failures from POST …/api/telemetry to stderr (wrong RANBVAL_HOST, network, etc.) |
Important: RANBVAL_HOST must be the password-manager origin (telemetry + repo policy). Do not point it at the auth service; that URL does not ingest telemetry.
For the full ingest schema, pagination, and dashboard behavior, see the ranbval-password-manager README (Telemetry section).
Git remote allowlist
If the project owner adds allowed repo URLs in the dashboard (or via POST /api/projects/{id}/whitelist), the SDK calls GET /api/public/repo-policy?client_salt=… and compares the result to the local git remote get-url origin. When enforce_allowlist is true (non-empty list), decrypt fails with a clear PermissionError before any provider API call.
| Variable | Meaning |
|---|---|
RANBVAL_HOST |
Same origin as telemetry (paths like /api/public/repo-policy are appended internally). |
RANBVAL_SKIP_REPO_CHECK |
Set to 1 / true to skip the check (development only; not for production). |
Empty allowlist on the server means no client-side enforcement.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file ranbval_sdk-0.2.11.tar.gz.
File metadata
- Download URL: ranbval_sdk-0.2.11.tar.gz
- Upload date:
- Size: 10.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/2.3.2 CPython/3.12.0 Darwin/25.4.0
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
6da5cff009e536d615aea4c36bd6a4557f65c210fbe6bd50c49df516b043f30b
|
|
| MD5 |
bc94f3a474fbd885c70534bd8e7ddf02
|
|
| BLAKE2b-256 |
8f19e28bcaef842817106418395cdab3c82296380c87e26d400f100626d3bf79
|
File details
Details for the file ranbval_sdk-0.2.11-cp312-cp312-macosx_26_0_arm64.whl.
File metadata
- Download URL: ranbval_sdk-0.2.11-cp312-cp312-macosx_26_0_arm64.whl
- Upload date:
- Size: 12.1 kB
- Tags: CPython 3.12, macOS 26.0+ ARM64
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/2.3.2 CPython/3.12.0 Darwin/25.4.0
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
007332cdf32cd2eb861ef02e055ee2e776c48138a8ad16b5734128c82e02619a
|
|
| MD5 |
1c89e5f2a52cfd45840315208be6b47d
|
|
| BLAKE2b-256 |
704638d01aa9f36645cd207a824f2da544694e7df2d81b61afeb6ca9b48dc6f3
|