Skip to main content

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)

Metadata

Release files for pangea-anthropic 0.2.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for pangea-anthropic 0.2.0
File Size Uploaded Provenance
pangea_anthropic-0.2.0.tar.gz 9.5 kB Without provenance Details

Built distribution (wheel)

Table of built distributions (wheels) for pangea-anthropic 0.2.0
File Interpreter ABI Platform
pangea_anthropic-0.2.0-py3-none-any.whl Python 3 none any Details

Total release size: 21.3 kB

Release files / pangea_anthropic-0.2.0.tar.gz

Download URL pangea_anthropic-0.2.0.tar.gz
Size 9.5 kB
Tags Source
SHA-256 checksum
How to use checksums
128aaddebaa40aad81026003e5873897176302aca13fc6133716a76a2a316993
BLAKE2b-256 checksum
How to use checksums
50131b5d6203098957b326499bd197e36898accfddca2080b42ac2da57427399
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.13.7

Release files / pangea_anthropic-0.2.0-py3-none-any.whl

Download URL pangea_anthropic-0.2.0-py3-none-any.whl
Size 11.8 kB
Tags Python 3
SHA-256 checksum
How to use checksums
d6143ab4aee0f007a149a5e5060c9922bc19bb2feb2ec072068bb9ebcb91d97f
BLAKE2b-256 checksum
How to use checksums
86c9254e1c0d7e375c380b847ba48ab9076ffc0af1c27ecb41f1e0814fb3c025
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.13.7

Security for pangea-anthropic 0.2.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page