skillfed

anthropic

The official Python library for the anthropic API

anthropic Permissive license MIT Active 3,816 v0.121.0 released

Install

anthropic on PyPI

pip

pip install anthropic

uv

uv add anthropic

poetry

poetry add anthropic

Package 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

Intended Audience :: DevelopersLicense :: OSI Approved :: MIT LicenseOperating System :: MacOSOperating System :: Microsoft :: WindowsOperating System :: OS IndependentOperating System :: POSIXOperating System :: POSIX :: LinuxProgramming Language :: Python :: 3.10Programming Language :: Python :: 3.11Programming Language :: Python :: 3.12Programming Language :: Python :: 3.13Programming Language :: Python :: 3.14Programming Language :: Python :: 3.9Topic :: Software Development :: Libraries :: Python ModulesTyping :: Typed

About anthropic

from the package's own PyPI description — quoted content, verbatim

Claude SDK for Python

PyPI version (image)

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.
claude api python clientanthropic sdk pythonllm api integration pythonclaude language model pythonai chatbot api pythonpython claude messagesanthropic python library

Similar packages