Anthropic Releases Python SDK v2.12.0
By anthropic-sdks-releaser[bot]Original title: v2.12.0
38AI Score
Anthropic has released Python SDK v2.12.0, the official client for calling the Claude API from Python applications, requiring Python 3.10 or later. This is a routine minor version bump with unchanged documentation and installation flow, and the sample code now references claude-opus-5-5 as the default model.
Related Entities
Full Report
Contents4 sections
Anthropic SDK for Python
The Anthropic SDK for Python provides access to the Claude API from Python applications.
Documentation
Full documentation is available at platform.claude.com/docs/en/api/sdks/python.
Installation
pip install anthropicUpgrading from a 0.x release? See the v1 migration guide.
Getting started
import os
from anthropic import Anthropic
client = Anthropic(
api_key=os.environ.get("ANTHROPIC_API_KEY"), # This is the default and can be omitted
)
message = client.messages.create(
max_tokens=1024,
messages=[
{
"role": "user",
"content": "Hello, Claude",
}
],
model="claude-opus-5-5",
)
print(message.content)Requirements
Python 3.10+