Which Python library does Anthropic officially provide for interacting with the Claude API?
Select an answer to reveal the explanation.
Short Explanation
Anthropic ships its own Python SDK — pip install anthropic — which wraps the REST API with convenience methods, type hints, streaming support, and automatic retries. You should use it for Claude API work.
Full Explanation
Anthropic provides an official Python SDK (anthropic) installable via pip install anthropic. It provides typed message creation, streaming support, automatic retry logic, environment variable API key management, and async support. The standard Python HTTP library requests is not Anthropic's official Claude library; it can call the REST API directly, but you must handle authentication, request payloads, streaming, retries, and error handling yourself. The OpenAI Python SDK is not Anthropic's official library and is not compatible with Claude, though some third-party compatibility layers exist. LangChain is a framework that can include Claude but is not required and not Anthropic's official library.