$npx skillfedfor your agent

anthropic

The official Python library for the anthropic API

Worth itPyPI Python ModulesReleased Aug 2026185.0M downloads / moMITPure Python

Decision gist · record as of 2026-08-14

pure-Python wheel — anthropic-0.122.0-py3-none-any.whl
v0.122.0 · released 2026-08-13 · Python >=3.9 · 8 runtime deps: anyio, distro, docstring-parser, httpx, jiter, pydantic, sniffio, typing-extensions

Yes. The package is the official, actively maintained SDK for Claude API access, has low install friction, carries no security vulnerabilities, and uses a permissive MIT license. Install it if you need to call Claude from Python; it is the standard way to do so.AI-flagged interpretation of the facts on this page — verify before relying

Before you install

  • Requires a valid ANTHROPIC_API_KEY environment variable or explicit API key passed to the Anthropic constructor to authenticate with the Claude API.
  • Low friction installation with a pure-wheel distribution.
  • Actively maintained with a release 1 day old and recent commits.

License · maintenance · safety

MIT (permissive) — MIT license permits unrestricted use, modification, and distribution in both open-source and proprietary projects without copyleft obligations.

last release 2026-08-13 (1 days) · last repo commit 2026-08-13 · 3,819 stars

0 known vulnerabilities (OSV.dev, 2026-08-14) · 185,027,807 downloads/mo, #224 on PyPI

Verify before relying

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)
  • Whether the package handles rate limiting or retry logic automatically, or if the caller must implement these.
  • Whether streaming responses are supported and how they differ from the shown synchronous example.
  • What happens when the ANTHROPIC_API_KEY environment variable is not set or invalid.
Same gist for agents: .md · .json

What it is and what it does

The anthropic package is the official Python SDK for accessing Anthropic's Claude API. It wraps HTTP communication with Claude's remote models, handling authentication, request serialization, and response parsing so that Python code can send messages and receive completions without managing raw HTTP calls. The package depends on httpx for networking, pydantic for data validation, and several utility libraries (anyio, sniffio, jiter, docstring-parser, distro, typing-extensions) to handle async I/O, JSON parsing, and type hints across Python versions.

Typical usage involves instantiating an Anthropic client with an API key, then calling client.messages.create() with a model name, token limit, and message history. The package handles the details of formatting requests and parsing responses into structured objects. It requires Python 3.9 or later and is actively maintained with support for current Python versions through 3.14.

Use it for

  • Building chatbots or conversational agents that delegate reasoning to Claude models without running local inference.
  • Integrating Claude into data processing pipelines to generate summaries, classifications, or analyses of text.
  • Creating content generation applications (documentation, code, creative writing) that call Claude on demand.
  • Prototyping AI features in production applications where API-based access is preferred over self-hosted models.
  • Automating customer support or Q&A workflows by routing queries to Claude and formatting responses.

Worth the install?

AI-flagged interpretation of the facts on this page. Verify before relying on it.

Worth it

Yes.

The package is the official, actively maintained SDK for Claude API access, has low install friction, carries no security vulnerabilities, and uses a permissive MIT license. Install it if you need to call Claude from Python; it is the standard way to do so.

Install

anthropic on PyPI

Before you install

Low friction installation with a pure-wheel distribution. Actively maintained with a release 1 day old and recent commits. Depends on common, well-established libraries (httpx, pydantic, anyio) with no compiled dependencies.

Requires a valid ANTHROPIC_API_KEY environment variable or explicit API key passed to the Anthropic constructor to authenticate with the Claude API.

License in practice

MIT license permits unrestricted use, modification, and distribution in both open-source and proprietary projects without copyleft obligations.

Quickstart

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)

Verify before relying

  • Whether the package handles rate limiting or retry logic automatically, or if the caller must implement these.
  • Whether streaming responses are supported and how they differ from the shown synchronous example.
  • What happens when the ANTHROPIC_API_KEY environment variable is not set or invalid.

Package facts

LicenseMIT permissive
Python supportSupports the current Python release >=3.9
Install frictionLow. Pure-Python wheel
Runtime dependencies
8 packages
anyiodistrodocstring-parserhttpxjiterpydanticsniffiotyping-extensions
MaintenanceActively maintained 1 days since the last release
Last repo commit
First released
Downloads185,027,807 / month, #224 on PyPI 30-day window, as of 2026-08-14
Known vulnerabilitiesNone known OSV.dev, checked 2026-08-14
Classifiers
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

Evidence: anthropic-0.122.0-py3-none-any.whl

Tags

Capabilities
claude api python clientanthropic sdk pythonllm api integration pythonclaude language model pythonai api wrapper pythonmessage generation apiclaude model access
Topics
llm-apiclaudegenerative-ai

Let your AI agent find packages like this

Example. Real query, live index.

You found this page by searching. An agent finds it by wishing: SkillFed indexes 14,416 PyPI packages by what they can do, searchable in plain language.

wish › “claude api python client”

  • anthropicProvides Python bindings to the Claude API, enabling applications to…
  • llama-index-llms-anthropicIntegrates Anthropic's Claude language models into LlamaIndex…
  • pagerduty-mcpAn MCP (Model Context Protocol) server that connects AI assistants in…

Give your agent the search over MCP, or paste the wish link into any chat.

More Python Modules packages

idna Worth it
PyPI · Python Modules · released Jun 2026

Converts domain names between Unicode and ASCII-compatible encoding (Punycode) according to IDNA 2008 and Unicode Technical Standard 46, with security validation and broader script coverage than the standard library.

Install it if you work with internationalized domain names, need to validate domains, or use HTTP clients that depend on it transitively.

BSD-3-Clausepure Python · 3.9+
1.8Bdownloads / mo
setuptools Worth it
PyPI · Python Modules · released Aug 2026

Setuptools is a Python build backend and package management tool that handles building, distributing, and installing Python packages, including support for C/C++ extension modules.

MITpure Python · 3.10+
1.6Bdownloads / mo
PyYAML Worth it
PyPI · Python Modules · released Sep 2025

PyYAML parses and emits YAML 1.1 data format, enabling serialization and deserialization of configuration files and Python objects to and from human-readable YAML text.

MITcompiled wheel · 3.8+
1.2Bdownloads / mo
pydantic Worth it
PyPI · Python Modules · released May 2026

Pydantic validates Python data structures against type hints, coercing and checking input at runtime to ensure it matches a declared schema.

MITpure Python · 3.9+
1.1Bdownloads / mo
annotated-types Worth it
PyPI · Python Modules · released Jul 2026

Provides reusable metadata objects for use with PEP-593 `typing.Annotated` to express common constraints like bounds, collection sizes, and predicates on types.

Install it if you use or build libraries that need to express type constraints in a standardized, inspectable way—or if you want to annotate your own types with…

MITpure Python · 3.10+
871.3Mdownloads / mo
typing-inspection Worth it
PyPI · Python Modules · released Aug 2026

Provides runtime tools to inspect and introspect Python type annotations, enabling programmatic examination of type hints at execution time.

MITpure Python · 3.10+
783.0Mdownloads / mo

See also claude-tap · llama-index-llms-anthropic · llm-anthropic · opentelemetry-instrumentation-anthropic · claude-code-sdk · claude-agent-sdk · any-llm-sdk · openinference-instrumentation-anthropic · together · xinference-client

Further reading