Debian Codegraph @

/

makefile 1 files · 3 symbols
README (full)

Claude SDK for Python

PyPI version

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

Upgrading from a 0.x release? See the v1 migration guide.

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-5-5",
)

print(message.content)

Requirements

Python 3.10+

Contributing

See CONTRIBUTING.md.

License

This project is licensed under the MIT License. See the LICENSE file for details.

dir .devcontainer/
dir .github/
dir .inline-snapshot/
dir .vscode/
dir bin/
dir debian/
dir examples/
dir scripts/
dir src/
dir tests/
dir typings/
file .gitignore
file .python-version
file .release-please-manifest.json
file .stats.yml
file Brewfile
file CHANGELOG.md
file CLAUDE.md
file CONTRIBUTING.md
file LICENSE
file MIGRATION.md
file README.md
file SECURITY.md
file api.md
file helpers.md
file pyproject.toml
file release-please-config.json
file requirements-dev.lock
file tools.md
file uv.lock