The Anthropic Python SDK is the official client library for the Anthropic API, maintained by Anthropic on GitHub where it has about 4,000 stars. It gives Python developers a typed, idiomatic way to call Claude models for messages, streaming, tool use and the rest of the platform’s features.
The SDK wraps the Anthropic REST API with both synchronous and asynchronous clients, full type annotations for requests and responses, and automatic handling of retries, timeouts and pagination. It supports streaming responses token by token, structured tool use and function calling, extended thinking, batch processing and file uploads, and it tracks new API capabilities closely as they ship. Because it is generated from the API specification with hand-written convenience layers, it stays current while still feeling like a native Python library, complete with Pydantic models and httpx-based transport that can be customized or mocked in tests.
The SDK itself is free and open source under the MIT license. Using it requires an Anthropic API key, and API calls to Claude models are billed by Anthropic according to their standard usage pricing.
This SDK is for Python developers building applications on Claude, from chatbots and agents to data pipelines, who want the supported, type-safe way to integrate the Anthropic API.