Skip to main content

ContextWall SDK - drop-in wrapper for Anthropic and OpenAI with context firewall enforcement

Project description

contextwall-sdk

Drop-in wrapper for Anthropic and OpenAI that routes calls through a local ContextWall daemon, enforcing your context firewall policy with no other code changes.

Install

pip install 'contextwall-sdk[anthropic]'
pip install 'contextwall-sdk[openai]'
pip install 'contextwall-sdk[all]'

Usage

from contextwall_sdk import SafeAnthropic

client = SafeAnthropic(api_key="sk-ant-...", ctxfw_url="http://localhost:8080")
# use exactly like the standard Anthropic client
from contextwall_sdk import SafeOpenAI

client = SafeOpenAI(api_key="sk-...", ctxfw_url="http://localhost:8080")

Blocked requests raise contextwall_sdk.ContextWallBlockedError with the policy violation detail.

Daemon setup

The SDK requires a running ContextWall daemon. See the quickstart or the GitHub repo.

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

contextwall_sdk-0.1.2.tar.gz (8.6 kB view details)

Uploaded Source

Built Distribution

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

contextwall_sdk-0.1.2-py3-none-any.whl (9.9 kB view details)

Uploaded Python 3

File details

Details for the file contextwall_sdk-0.1.2.tar.gz.

File metadata

  • Download URL: contextwall_sdk-0.1.2.tar.gz
  • Upload date:
  • Size: 8.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.14.4

File hashes

Hashes for contextwall_sdk-0.1.2.tar.gz
Algorithm Hash digest
SHA256 a854d8f14d920bbcfb20c9d49d7758759c9cc47e0e306d725675fd39ba2acada
MD5 9204f4eb035b01f8aa94f4334eddb75d
BLAKE2b-256 14fce50732dff7c4980fa7985da72b7d48ab8438463e673b6db998e2adf8302e

See more details on using hashes here.

File details

Details for the file contextwall_sdk-0.1.2-py3-none-any.whl.

File metadata

File hashes

Hashes for contextwall_sdk-0.1.2-py3-none-any.whl
Algorithm Hash digest
SHA256 aa3fe6661cec763fa410b3b2e78187797dace98c2af65f071bbeace76659ac7d
MD5 16957f8b652bdb9c679985b93c74b776
BLAKE2b-256 88b227cad497f214c29e593431370760bc38a7333611c07c349b7b47cc09d663

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