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.
from llm_abstraction import MistralBackend
backend = MistralBackend(api_key="...")
response = await backend.chat(
[
{"role": "user", "content": "Hello"},
],
)
print(response.content)
embeddings = await backend.embed(["Hello"])
print(embeddings.embeddings[0])
Build
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:
twine upload --repository testpypi dist/*
PyPI:
twine upload dist/*
After publishing, downstream projects can depend on:
llm-abstraction>=0.1.0
Metadata
Release files for llm-abstraction 0.3.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| llm_abstraction-0.3.0.tar.gz | 7.3 kB | Without provenance | Details for llm_abstraction-0.3.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| llm_abstraction-0.3.0-py3-none-any.whl | Python 3 | none | any | Details for llm_abstraction-0.3.0-py3-none-any.whl |
Total release size: 14.5 kB
Release files / llm_abstraction-0.3.0.tar.gz
| Download URL | llm_abstraction-0.3.0.tar.gz |
|---|---|
| Size | 7.3 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
87ffc38b97e5ae310e9f6533f9601209aa3ebeee1e906742acba2f0ed70b1f1e
|
|
BLAKE2b-256 checksum How to use checksums |
f5916ad5cb92f8a03ef61b10552001e50434f7900e1cf04e02cea6634c6cf3c6
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.13.1
|
Release files / llm_abstraction-0.3.0-py3-none-any.whl
| Download URL | llm_abstraction-0.3.0-py3-none-any.whl |
|---|---|
| Size | 7.2 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
e4711cf07692e13e3c2d76c2cf518be25a6fda8ade2e957b697b84c6e9f879c5
|
|
BLAKE2b-256 checksum How to use checksums |
73311b95b82efc86e3b4a7bda9d2dd9a50c67fbcc62563b8b112351a3ff17f6a
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.13.1
|
Security for llm-abstraction 0.3.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.