Metadata-Version: 2.4
Name: llm-abstraction
Version: 0.1.0
Summary: Async LLM backend abstraction with Retry-After aware clients.
Author: Evan D'Entremont
License-Expression: MIT
Project-URL: Homepage, https://github.com/evandentremont/llm-abstraction
Project-URL: Repository, https://github.com/evandentremont/llm-abstraction
Project-URL: Issues, https://github.com/evandentremont/llm-abstraction/issues
Classifier: Development Status :: 3 - Alpha
Classifier: Intended Audience :: Developers
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Programming Language :: Python :: 3.13
Classifier: Typing :: Typed
Requires-Python: >=3.10
Description-Content-Type: text/markdown
License-File: LICENSE
Requires-Dist: httpx>=0.27.0
Provides-Extra: dev
Requires-Dist: build>=1.2.0; extra == "dev"
Requires-Dist: mypy>=1.17.0; extra == "dev"
Requires-Dist: pyright>=1.1.400; extra == "dev"
Requires-Dist: pytest>=8.0.0; extra == "dev"
Requires-Dist: pytest-asyncio>=0.23.0; extra == "dev"
Requires-Dist: ruff>=0.12.0; extra == "dev"
Requires-Dist: twine>=5.0.0; extra == "dev"
Dynamic: license-file

# llm-abstraction

Async LLM backend abstraction with shared `Retry-After` handling.

Only Mistral chat completions are implemented right now, but the package is
structured around a generic async backend interface.

```python
from llm_abstraction import MistralBackend

backend = MistralBackend(api_key="...")
response = await backend.chat(
    [
        {"role": "user", "content": "Hello"},
    ],
)
print(response.content)
```

## Build

```sh
python -m venv .venv
source .venv/bin/activate
pip install -e ".[dev]"
pytest
ruff check .
mypy
pyright
python -m build
twine check dist/*
```

## Publish

TestPyPI:

```sh
twine upload --repository testpypi dist/*
```

PyPI:

```sh
twine upload dist/*
```

After publishing, downstream projects can depend on:

```txt
llm-abstraction>=0.1.0
```
