anthropic
The official Python library for the anthropic API
Install
anthropic on PyPI
pip
pip install anthropicuv
uv add anthropicpoetry
poetry add anthropicPackage facts
| License | MIT (permissive) |
| Python support | supports the current Python release (>=3.9) |
| Install friction | low — pure-Python wheel |
| Runtime dependencies | 8 — anyio, distro, docstring-parser, httpx, jiter, pydantic, sniffio, typing-extensions |
| Maintenance | actively maintained — 6 days since the last release |
| Last repo commit | |
| First released | |
| Popularity | one of the top 1,000 most-downloaded packages on PyPI (30-day window, as of 2026-08-13) |
| Known vulnerabilities | none known (OSV.dev, checked 2026-08-13) |
Evidence: anthropic-0.121.0-py3-none-any.whl
About anthropic
from the package's own PyPI description — quoted content, verbatim
Claude SDK for Python
The Claude 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 anthropic
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-4-6",
)
print(message.content)
Requirements
Python 3.9+
Contributing
See CONTRIBUTING.md.
License
This project is licensed under the MIT License. See the LICENSE file for details.
Read as markdown · JSON record · Source repository · Homepage
AI interpretation — verify before relying
AI-generated interpretation of the package facts above; every digit, version, license, or vulnerability id it cites is grounded in the facts already shown on this page
The Claude SDK for Python provides direct access to Anthropic's Claude API, enabling Python applications to send messages to Claude models and receive responses.
Low friction install with a pure-wheel distribution and well-maintained dependencies. Active development with a release 6 days ago indicates solid community backing.
MIT license permits commercial and private use with minimal restrictions; you may use, modify, and distribute this package freely provided you include the license notice.
Usage
pip install anthropic
import os
from anthropic import Anthropic
client = Anthropic(api_key=os.environ.get("ANTHROPIC_API_KEY"))
message = client.messages.create(
max_tokens=1024,
messages=[{"role": "user", "content": "Hello, Claude"}],
model="claude-opus-4-6"
)
print(message.content)
Requires Python 3.9 or later; requires a valid ANTHROPIC_API_KEY environment variable or explicit API key to authenticate with Claude API.
Verdict: A well-maintained, actively developed official SDK with low install friction, permissive MIT licensing, and no known vulnerabilities. Suitable for production use in Python 3.9+ applications needing Claude API access.
Needs verification
- Whether the SDK supports streaming responses or only blocking message creation as shown in the excerpt.
- Rate limiting or quota behavior when making repeated API calls.
- Whether additional system dependencies beyond Python are required for any runtime operations.
Similar packages
permissive · top 1,000 on PyPI
claude-agent-sdkpermissive · top 1,000 on PyPI
groqpermissive · top 1,000 on PyPI
openaipermissive · top 1,000 on PyPI
litellmpermissive · top 100 on PyPI
strands-agentspermissive · top 1,000 on PyPI
mistralaiunclear · top 1,000 on PyPI
realtimepermissive · top 1,000 on PyPI
mlflow-tracingpermissive · top 1,000 on PyPI
llama-cloudpermissive · top 1,000 on PyPI