Metadata-Version: 2.5
Name: aiollm-anthropic
Version: 0.15.0
Summary: Anthropic's Messages and Files APIs for aiollm
Project-URL: Homepage, https://github.com/aiollm-org/aiollm_anthropic
Project-URL: Documentation, https://aiollm-org.github.io/aiollm/
Project-URL: Repository, https://github.com/aiollm-org/aiollm_anthropic
Project-URL: Issues, https://github.com/aiollm-org/aiollm_anthropic/issues
Project-URL: Changelog, https://github.com/aiollm-org/aiollm_anthropic/blob/master/CHANGELOG.md
Author-email: GrehBan <maximfeedback19@gmail.com>
Maintainer-email: GrehBan <maximfeedback19@gmail.com>
License-Expression: MIT
License-File: LICENSE
Keywords: ai,aiohttp,anthropic,api-client,async,asyncio,claude,llm,messages-api,pydantic,streaming,typed
Classifier: Development Status :: 2 - Pre-Alpha
Classifier: Framework :: AsyncIO
Classifier: Framework :: Pydantic :: 2
Classifier: Framework :: aiohttp
Classifier: Intended Audience :: Developers
Classifier: Operating System :: OS Independent
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3 :: Only
Classifier: Programming Language :: Python :: 3.13
Classifier: Programming Language :: Python :: 3.14
Classifier: Programming Language :: Python :: 3.15
Classifier: Programming Language :: Python :: Implementation :: CPython
Classifier: Topic :: Internet :: WWW/HTTP
Classifier: Topic :: Scientific/Engineering :: Artificial Intelligence
Classifier: Topic :: Software Development :: Libraries :: Python Modules
Classifier: Typing :: Typed
Requires-Python: >=3.13
Requires-Dist: aiollm-core<0.16,>=0.15
Requires-Dist: pydantic>=2.14.1
Description-Content-Type: text/markdown

# aiollm-anthropic

Anthropic's Messages and Files APIs for [aiollm](https://github.com/aiollm-org/aiollm), the async-first toolkit for typed HTTP API clients.

`AnthropicClient` sends Anthropic's own methods (`CreateMessage`, `StreamMessage` and the Files methods) with types generated from Anthropic's official SDK types and its Files API reference, and has aiollm's provider-neutral `client.generation` and `client.files`, so code written for any aiollm provider runs on it.

> **Status: pre-alpha.** The package was part of aiollm up to 0.14.0 as `aiollm.providers.anthropic`; it is now `aiollm_anthropic`. Its public API may still change: before 1.0 a breaking change bumps the minor version.

## Installation

The package requires Python 3.13 or newer and installs the core it needs, [aiollm-core](https://pypi.org/project/aiollm-core/):

```bash
pip install aiollm-anthropic
```

Or with uv: `uv add aiollm-anthropic`. To work on the package itself, see [CONTRIBUTING.md](CONTRIBUTING.md).

## Quick start

`AnthropicClient()` reads the key from `ANTHROPIC_API_KEY`; pass a token to give it yourself.

```python title="quick_start.py"
from aiollm_anthropic import AnthropicClient


async def ask() -> str:
    async with AnthropicClient() as client:
        response = await client.generation.create(
            model="claude-opus-5-5",
            input="Hi",
            instructions="Be brief",
            max_output_tokens=256,
        )
    return response.text
```

Run it with `asyncio.run(ask())`.

## Documentation

The guide and the API reference are on the aiollm site, **[aiollm-org.github.io/aiollm](https://aiollm-org.github.io/aiollm/)**: [provider clients](https://aiollm-org.github.io/aiollm/guide/providers/), [shared generation](https://aiollm-org.github.io/aiollm/guide/generation/) and [files](https://aiollm-org.github.io/aiollm/guide/files/). The changes up to 0.14.0 are in [aiollm's changelog](https://github.com/aiollm-org/aiollm/blob/master/CHANGELOG.md); the later ones in [CHANGELOG.md](CHANGELOG.md).

## License

MIT. See [LICENSE](LICENSE).
