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

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.9.tar.gz (9.6 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.9-cp312-cp312-macosx_26_0_arm64.whl (11.6 kB view details)

Uploaded CPython 3.12macOS 26.0+ ARM64

File details

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

File metadata

  • Download URL: ranbval_sdk-0.2.9.tar.gz
  • Upload date:
  • Size: 9.6 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.9.tar.gz
Algorithm Hash digest
SHA256 eb2645bd3677c7b3898848a85906e43d9a653010c8e1e02de3166a2a09722e82
MD5 2c860e8573666680a5d0bfb42416a20d
BLAKE2b-256 a8ff1dfae7fc65400000e955e99b8fa1ddbed0ec7a714732d805f51fdf947cf8

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for ranbval_sdk-0.2.9-cp312-cp312-macosx_26_0_arm64.whl
Algorithm Hash digest
SHA256 02e6d38acfaf468470d57501a0ed3d067540aedbb01628b1e223883e25a4f592
MD5 96f0dbdc6fc20216b8dc089668463176
BLAKE2b-256 c1b0646382516fe9f9da28d66c9ac4166ab70c1c92d49d58daca64a0995c6e52

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