Skip to main content

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.

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


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

ranbval_sdk-0.2.10.tar.gz (9.9 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

ranbval_sdk-0.2.10-cp312-cp312-macosx_26_0_arm64.whl (12.0 kB view details)

Uploaded CPython 3.12macOS 26.0+ ARM64

File details

Details for the file ranbval_sdk-0.2.10.tar.gz.

File metadata

  • Download URL: ranbval_sdk-0.2.10.tar.gz
  • Upload date:
  • Size: 9.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/2.3.2 CPython/3.12.0 Darwin/25.4.0

File hashes

Hashes for ranbval_sdk-0.2.10.tar.gz
Algorithm Hash digest
SHA256 bd43f858997f0174b213a8829b4bac40b572d4798f341987357c28769131380c
MD5 69e98a5446b7a5a8653ae8b7b501dfa4
BLAKE2b-256 a9a390a91105b57515fac88b53f57589ee21ed3925549a6cb69c5dea8f90eb2e

See more details on using hashes here.

File details

Details for the file ranbval_sdk-0.2.10-cp312-cp312-macosx_26_0_arm64.whl.

File metadata

File hashes

Hashes for ranbval_sdk-0.2.10-cp312-cp312-macosx_26_0_arm64.whl
Algorithm Hash digest
SHA256 ce8bb70b5002da3bc6a82442528d19b167a4092a7bd94a6cdef83f41f77c4ddf
MD5 6992af79af4b7bd36d9285b1ded05e22
BLAKE2b-256 97844e0b30c80f6293f52bd05ab255bb7b4e48017d7e96f32dc6c4be66dcbd05

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page