NewYour coding agent can read the release notes before it upgrades.Set up the MCP server →
PyPI · #208 most downloaded on PyPI
The official Python library for the anthropic API
Last release today
30 Sep 2026
Ships on a steady schedule
a new release about every 1 weeks
Nearly every release is documented
notes for 60 of the last 60 stable releases
Nothing withdrawn
no release was ever pulled
4 years old
223 releases · first in 2023
One column per quarter.
api: add new usage response fields
interal: make link to api.md relative
## 0.14.0 (2024-01-31) Full Changelog: v0.13.0...v0.14.0 ### Features * bedrock: include bedrock SDK
client: support parsing custom response types
client: enable follow redirects by default
vertex: add support for google vertex
client: add support for streaming raw responses
Full Changelog: v0.9.0...v0.10.0
add None default value to nullable response properties
internal: use ruff instead of black for formatting
api: add messages endpoint with streaming helpers
avoid leaking memory when Client.with_options is used
Full Changelog: v0.7.7...v0.7.8
internal: add tests for proxy change
## 0.7.6 (2023-11-28) Full Changelog: v0.7.5...v0.7.6 ### Chores * deps: bump mypy to v1.7.1
internal: revert recent options change
## 0.7.4 (2023-11-23) Full Changelog: v0.7.3...v0.7.4 ### Chores * internal: options updates
client: attempt to parse unknown json content types
internal: update type hint for helper function
## 0.7.1 (2023-11-16) Full Changelog: v0.7.0...v0.7.1 ### Documentation * readme: minor updates
client: support reading the base url from an env variable
Full Changelog: v0.6.0...v0.7.0
client: adjust retry behavior to be exponential backoff
Full Changelog: v0.5.1...v0.6.0
client: support passing httpx.URL instances to base_url
client: accept io.IOBase instances in file params
Full Changelog: v0.4.0...v0.4.1
allow a default timeout to be set for clients
docs: remove extraneous space in examples
client: add constants to client instances as well
client: add client close handlers
readme: reference "client" in errors section and add missing import
fix(tokenizer): encoding issues for special characters
Full Changelog: https://github.com/anthropics/anthropic-sdk-python/compare/v0.3.2...v0.3.3
upper bound pydantic version to 2.0 by @uripeled2 in https://github.com/anthropics/anthropic-sdk-python/pull/50
Full Changelog: https://github.com/anthropics/anthropic-sdk-python/compare/v0.3.1...v0.3.2
This release prevents the async tokenizer from crashing if called multiple times in the same process, https://github.com/anthropics/anthropic-sdk-pyth
This release prevents the async tokenizer from crashing if called multiple times in the same process, https://github.com/anthropics/anthropic-sdk-python/pull/47.
In v0.3.0, we introduced a fully rewritten SDK.
In v0.3.0, we introduced a fully rewritten SDK.
The new version uses separate sync and async clients, unified streaming, typed params and structured response objects, and resource-oriented methods:
Sync before/after:
- client = anthropic.Client(os.environ["ANTHROPIC_API_KEY"])
+ client = anthropic.Anthropic(api_key=os.environ["ANTHROPIC_API_KEY"])
# or, simply provide an ANTHROPIC_API_KEY environment variable:
+ client = anthropic.Anthropic();
- rsp = client.completion(**params)
- rsp["completion"]
+ rsp = client.completions.create(**params)
+ rsp.completion
Async before/after:
- client = anthropic.Client(os.environ["ANTHROPIC_API_KEY"])
+ client = anthropic.AsyncAnthropic(api_key=os.environ["ANTHROPIC_API_KEY"])
- await client.acompletion(**params)
+ await client.completions.create(**params)
The .completion_stream() and .acompletion_stream() methods have been removed;
simply pass stream=Trueto .completions.create().
Streaming responses are now incremental; the full text is not sent in each message,
as v0.3 sends the Anthropic-Version: 2023-06-01 header.
<details> <summary>Example streaming diff</summary>
import anthropic
- client = anthropic.Client(os.environ["ANTHROPIC_API_KEY"])
+ client = anthropic.Anthropic()
# Streams are now incremental diffs of text
# rather than sending the whole message every time:
text = "
- stream = client.completion_stream(**params)
- for data in stream:
- diff = data["completion"].replace(text, "")
- text = data["completion"]
+ stream = client.completions.create(**params, stream=True)
+ for data in stream:
+ diff = data.completion # incremental text
+ text += data.completion
print(diff, end="")
print("Done. Final text is:")
print(text)
</details>
Full Changelog: https://github.com/anthropics/anthropic-sdk-python/compare/v0.2.10...v0.3.0
# What's Changed * Add version header Full Changelog: https://github.com/anthropics/anthropic-sdk-python/compare/v0.2.9...v0.2.10
Full Changelog: https://github.com/anthropics/anthropic-sdk-python/compare/v0.2.9...v0.2.10
Remove length check from automatic SDK validations. by @jenan-anthropic in https://github.com/anthropics/anthropic-sdk-python/pull/30
Full Changelog: https://github.com/anthropics/anthropic-sdk-python/compare/v0.2.8...v0.2.9
Remove length check from automatic SDK validations #30
Full Changelog: https://github.com/anthropics/anthropic-sdk-python/compare/v0.2.7...v0.2.8
Fix: UnicodeEncodeError by @anthony-sarkis in https://github.com/anthropics/anthropic-sdk-python/pull/19
Full Changelog: https://github.com/anthropics/anthropic-sdk-python/compare/v0.2.6...v0.2.7
Better async support by @mikelambert in https://github.com/anthropics/anthropic-sdk-python/pull/17
Full Changelog: https://github.com/anthropics/anthropic-sdk-python/compare/v0.2.5...v0.2.6
Fix for async API when handling errors
Fix for async API when handling errors
Raise exceptions on non-200 responses
Full Changelog: https://github.com/anthropics/anthropic-sdk-python/compare/v0.2.3...v0.2.4
Remove extra \n, use claude-v1 by @jacksonkernion in https://github.com/anthropics/anthropic-sdk-python/pull/5
\n, use claude-v1 by @jacksonkernion in https://github.com/anthropics/anthropic-sdk-python/pull/5Full Changelog: https://github.com/anthropics/anthropic-sdk-python/compare/v0.2.2...v0.2.3
Nothing published for this version
Your coding agent can read these notes before it upgrades. Set up the MCP server →