简报·YT
← 返回 GitHub 动态
anthropics/anthropic-sdk-python · 📌 手动指定 已完成

anthropics/anthropic-sdk-python v0.120.0

2026-07-24 16:32 · ⭐ 3773 · GitHub Release 原文 ↗
#模型更新 #工具管理 #API增强

anthropics/anthropic-sdk-python v0.120.0

该版本新增了 Claude Opus 5 模型、工具增删块及 tool_change 事件支持,并扩展了客户端回退信用令牌类型与服务器端回退默认选项。

▸ Release Notes 英文原文(698 字符)
## 0.120.0 (2026-07-24) Full Changelog: [v0.119.0...v0.120.0](https://github.com/anthropics/anthropic-sdk-python/compare/v0.119.0...v0.120.0) ### Features * **api:** add claude-opus-5 model ([bf4e31c](https://github.com/anthropics/anthropic-sdk-python/commit/bf4e31c17c43ba2b409bec57e1856b025d159f1a)) * **api:** add tool addition/removal blocks and tool_change events ([bf4e31c](https://github.com/anthropics/anthropic-sdk-python/commit/bf4e31c17c43ba2b409bec57e1856b025d159f1a)) * **api:** expand client-side fallback credit token types and add server-side fallbacks default option ([bf4e31c](https://github.com/anthropics/anthropic-sdk-python/commit/bf4e31c17c43ba2b409bec57e1856b025d159f1a))
▸ 主项目介绍 · anthropics/anthropic-sdk-python
▸ README 原文(同步于 2026-07-19 13:24)
# Claude SDK for Python [![PyPI version](https://img.shields.io/pypi/v/anthropic.svg)](https://pypi.org/project/anthropic/) The Claude SDK for Python provides access to the [Claude API](https://docs.anthropic.com/en/api/) from Python applications. ## Documentation Full documentation is available at **[platform.claude.com/docs/en/api/sdks/python](https://platform.claude.com/docs/en/api/sdks/python)**. ## Installation ```sh pip install anthropic ``` ## Getting started ```python 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](./CONTRIBUTING.md). ## License This project is licensed under the MIT License. See the [LICENSE](LICENSE) file for details.