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
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 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
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
a854d8f14d920bbcfb20c9d49d7758759c9cc47e0e306d725675fd39ba2acada
|
|
| MD5 |
9204f4eb035b01f8aa94f4334eddb75d
|
|
| BLAKE2b-256 |
14fce50732dff7c4980fa7985da72b7d48ab8438463e673b6db998e2adf8302e
|
File details
Details for the file contextwall_sdk-0.1.2-py3-none-any.whl.
File metadata
- Download URL: contextwall_sdk-0.1.2-py3-none-any.whl
- Upload date:
- Size: 9.9 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.14.4
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
aa3fe6661cec763fa410b3b2e78187797dace98c2af65f071bbeace76659ac7d
|
|
| MD5 |
16957f8b652bdb9c679985b93c74b776
|
|
| BLAKE2b-256 |
88b227cad497f214c29e593431370760bc38a7333611c07c349b7b47cc09d663
|