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

anthropics/anthropic-sdk-python v1.0.0

2026-08-20 19:58 · ⭐ 3841 · GitHub Release 原文 ↗
#客户端升级 #破坏性变更 #修复警告

anthropics/anthropic-sdk-python v1.0.0

这个版本的核心变更是将底层 HTTP 客户端升级到 httpx2,并引入少量破坏性变更,同时修复了解析/流式/工具运行器中的 beta 警告问题。

▸ Release Notes 英文原文(1090 字符)
## 1.0.0 (2026-08-20) Full Changelog: [v0.125.0...v1.0.0](https://github.com/anthropics/anthropic-sdk-python/compare/v0.125.0...v1.0.0) ### ⚠ BREAKING CHANGES * **client:** upgrade to httpx2 and some minor breaking changes. See MIGRATION.md for details ### Features * **client:** upgrade to httpx2 and some minor breaking changes. See MIGRATION.md for details ([33e2967](https://github.com/anthropics/anthropic-sdk-python/commit/33e296749dda59c3b9af85d9bee37ae241b92a28)) ### Bug Fixes * **beta:** stop warning about `output_format=` on the parse/stream/tool_runner helpers ([59bf261](https://github.com/anthropics/anthropic-sdk-python/commit/59bf26106d3d66cef54b926aeae4268846bf13f2)) ### Chores * **streaming:** restore the original event imports in lib/streaming/_types.py ([87e9e01](https://github.com/anthropics/anthropic-sdk-python/commit/87e9e0157c08ad4b9bb4c44081171285499b1aa3)) ### Documentation * **examples:** use adaptive thinking in thinking examples ([b5870af](https://github.com/anthropics/anthropic-sdk-python/commit/b5870afda154cc12ab15fad5ca6f53a280e09ee3))
▸ 主项目介绍 · 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.