llmwrap
Lightweight adapter for LLM chat completions — text, images, PDFs/files.
OpenAI-compatible (works great with OpenRouter, Anthropic via compat layer, etc.).
Installation
pip install amyrmahdy-llmwrap
# or
uv add amyrmahdy-llmwrap
Quick start
from amyrmahdy_llmwrap import LLM
llm = LLM(
api_key="sk-...",
base_url="https://openrouter.ai/api/v1",
model="anthropic/claude-3.5-sonnet",
)
# Text
print(llm.complete([{"role": "user", "content": "Hi!"}]))
# Image + text
messages = [
{"role": "user", "content": [
LLM.text_content("Describe this."),
LLM.image_content("photo.jpg"),
]}
]
print(llm.complete(messages))
Release files for amyrmahdy-llmwrap 0.1.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| amyrmahdy_llmwrap-0.1.1.tar.gz | 29.4 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| amyrmahdy_llmwrap-0.1.1-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 32.2 kB
Release files / amyrmahdy_llmwrap-0.1.1.tar.gz
| Download URL | amyrmahdy_llmwrap-0.1.1.tar.gz |
|---|---|
| Size | 29.4 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
6d541c3ad2123320483fdf94f31b08efdf73a8e54e467a6a7297c6ad9584f133
|
|
BLAKE2b-256 checksum How to use checksums |
3afb28e57026319aee64f6d6035af21bbce2e999b8f23059be0fcd1881d28405
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.10.4 {"installer":{"name":"uv","version":"0.10.4","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Linux Mint","version":"22.1","id":"xia","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}
|
Release files / amyrmahdy_llmwrap-0.1.1-py3-none-any.whl
| Download URL | amyrmahdy_llmwrap-0.1.1-py3-none-any.whl |
|---|---|
| Size | 2.7 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
cc12d1d4658c64f382212dbe2a9225be269f55e7ef2ccc42937195755b0edeac
|
|
BLAKE2b-256 checksum How to use checksums |
bb5eba10cdd1931a371725f5d68bdb4e6a226b473731ec4de90cad1ff489ced4
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.10.4 {"installer":{"name":"uv","version":"0.10.4","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Linux Mint","version":"22.1","id":"xia","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}
|