A wrapper around the Anthropic Python library
Project description
Pangea + Anthropic Python API library
A wrapper around the Anthropic Python library that wraps the Messages API with Pangea AI Guard. Supports Python v3.10 and greater.
Installation
pip install -U pangea-anthropic
Usage
import os
from pangea_anthropic import PangeaAnthropic
client = PangeaAnthropic(
pangea_api_key=os.environ.get("PANGEA_API_KEY"),
pangea_input_recipe="pangea_prompt_guard",
pangea_output_recipe="pangea_llm_response_guard",
api_key=os.environ.get("ANTHROPIC_API_KEY"),
)
message = client.messages.create(
max_tokens=1024,
messages=[
{
"role": "user",
"content": "Hello, Claude",
}
],
model="claude-sonnet-4-20250514",
)
print(message.content)
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 pangea_anthropic-0.2.0.tar.gz.
File metadata
- Download URL: pangea_anthropic-0.2.0.tar.gz
- Upload date:
- Size: 9.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
128aaddebaa40aad81026003e5873897176302aca13fc6133716a76a2a316993
|
|
| MD5 |
5f51149c470bd78d20bbf053ed4f1222
|
|
| BLAKE2b-256 |
50131b5d6203098957b326499bd197e36898accfddca2080b42ac2da57427399
|
File details
Details for the file pangea_anthropic-0.2.0-py3-none-any.whl.
File metadata
- Download URL: pangea_anthropic-0.2.0-py3-none-any.whl
- Upload date:
- Size: 11.8 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
d6143ab4aee0f007a149a5e5060c9922bc19bb2feb2ec072068bb9ebcb91d97f
|
|
| MD5 |
c6052e34d4cbe63283cd6daf860e9e1a
|
|
| BLAKE2b-256 |
86c9254e1c0d7e375c380b847ba48ab9076ffc0af1c27ecb41f1e0814fb3c025
|