
anthropic-sdk-python
Official Python SDK for the Anthropic API (Claude models).
Coldcast Lens
The Anthropic Python SDK is the official way to talk to Claude — and it's how you should be doing it. Type-safe request and response models, async/await support, streaming via SSE, tool calling helpers, token counting, and automatic retries with exponential backoff. It's not flashy, but it's the most reliable path to Claude's API.
If you're building with Claude in Python, use this SDK. Period. The OpenAI Python SDK is the equivalent for GPT models — similar design philosophy, different provider. LangChain wraps multiple providers but adds abstraction overhead. LiteLLM gives you a unified interface across providers if you need to swap models. The Anthropic TypeScript SDK covers the same functionality for Node.js.
The catch: this SDK is Claude-only. If your product needs to call multiple LLM providers, you'll either use this alongside OpenAI's SDK or reach for a wrapper like LiteLLM. Python 3.9+ is required — older environments need upgrading. And the SDK version moves fast (v0.86.0 as of March 2026), so pin your version and test upgrades carefully.
License: MIT License
Use freely, including commercial. Just keep the license.
Commercial use: ✓ Yes
About
- Owner
- Anthropic (Organization)
- Backed by
- Google, Spark Capital
- Stars
- 3,012
- Forks
- 545
- discussed
Explore Further
More tools in the directory
Get tools like this delivered weekly
The Open Source Drop — the best new open source tools, analyzed. Free.