anyask
Call an LLM provider with a single text prompt, get its raw response back — one function, 18 vendors, zero routing/fallback magic.
import anyask
response = anyask.ask(
"Say hello in one word.",
provider="anthropic",
model="claude-haiku-4-5-20251001",
api_key="sk-...", # or set ANTHROPIC_API_KEY
)
print(response.content) # "Hello"
print(response.usage) # TokenUsage(prompt_tokens=..., completion_tokens=..., total_tokens=...)
Features
- Lightweight installation — a bare
pip install anyaskpulls in exactly one dependency (PyYAML); each provider you actually use adds only that provider's own SDK, never the other 17. Cheap to bake into a container image, fast to install in CI. - One function, 18 vendors —
ask()/ask_async()take the sameprovider=/model=signature everywhere; swap providers by changing one string. - No routing/fallback magic —
providerandmodelare always explicit; anyask never silently swaps one vendor for another. - Real reasoning support, not simulated —
reasoning=Trueenables each provider's own actual extended-thinking mechanism where one exists. - A small built-in CLI —
anyask check/anyask readyanswer "is this provider's SDK installed and its credentials set," with no network call.
Installation
pip install anyask # minimal install — no provider usable yet
pip install anyask[anthropic] # + Anthropic only
pip install anyask[openai,gemini] # + multiple providers
pip install anyask[all] # + every provider SDK
Verify:
anyask version # installed version
anyask ready # sweep every provider's SDK/credential status
anyask check anthropic # check one provider specifically, exit 0/1
Supported providers
openai, anthropic, gemini, vertexai, azure, mistral, cohere, bedrock,
oci, and the nine OpenAI-compatible vendors: deepseek, groq, xai, together,
fireworks, cerebras, perplexity, openrouter, moonshot.
What is anyask
A single-responsibility package for one job: call an LLM provider, get its raw
response back. prompt is always a plain string and AskResponse.content is
always a plain string — no multi-turn history, no system prompts, no
multi-modal input/output, no streaming. That narrow contract is deliberate,
not a missing feature — see SPEC.md
for the full design and SPEC.md's out-of-scope list
for exactly what's excluded and why.
Why do you need anyask
If you're calling more than one LLM vendor, you're already facing 18 SDKs with
18 different client shapes, auth patterns, and response formats. anyask is the
thin, uniform layer underneath: one call signature, one normalized response
shape (content/usage/finish_reason/raw), and nothing else — no
opinions about retries, fallback, cost tracking, or agent orchestration. Build
those on top if you need them, or just use anyask directly when you don't.
It's also the option to reach for when install footprint actually matters —
CI pipelines, container images, or a library that can't afford to drag in
SDKs its own users never touch.
Documentation
Full docs, including the Quickstart, Providers reference, CLI Guide, and generated API Reference:
- Latest: https://geeks-trident-llc.github.io/anyask/latest/
- All versions: https://geeks-trident-llc.github.io/anyask/
License
MIT
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file anyask-0.2.2.tar.gz.
File metadata
- Download URL: anyask-0.2.2.tar.gz
- Upload date:
- Size: 25.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/7.0.0 CPython/3.13.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
3e8d81f20969be8ea16941bb9bf040da4e0a3529ae615512afc2fa49165fb34f
|
|
| MD5 |
b6cae3286aa8b2ff05d374470d68fa95
|
|
| BLAKE2b-256 |
1f225fed5899ceaf1a91f5d62c77a6c7a5d7dc42e65d0aae10d41412aa857546
|
Provenance
The following attestation bundles were made for anyask-0.2.2.tar.gz:
Publisher:
publish-pypi.yml on Geeks-Trident-LLC/anyask
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
anyask-0.2.2.tar.gz -
Subject digest:
3e8d81f20969be8ea16941bb9bf040da4e0a3529ae615512afc2fa49165fb34f - Sigstore transparency entry: 2349423949
- Sigstore integration time:
-
Permalink:
Geeks-Trident-LLC/anyask@10861360e239a13a0627707c0e8bee845b7fb3ef -
Branch / Tag:
refs/tags/v0.2.2 - Owner: https://github.com/Geeks-Trident-LLC
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish-pypi.yml@10861360e239a13a0627707c0e8bee845b7fb3ef -
Trigger Event:
release
-
Statement type:
File details
Details for the file anyask-0.2.2-py3-none-any.whl.
File metadata
- Download URL: anyask-0.2.2-py3-none-any.whl
- Upload date:
- Size: 38.5 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/7.0.0 CPython/3.13.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
e4e69b8d1901f4d58bff0e822114af2f4672eccb555d442f53578a0c7dbd51f9
|
|
| MD5 |
54289a9c722f7d21e65cd74baba8c3f9
|
|
| BLAKE2b-256 |
0e7bc0e3f7d5ee55174c130e80f17ae197d5b8a387a3b67f8f58b2ff4de538c4
|
Provenance
The following attestation bundles were made for anyask-0.2.2-py3-none-any.whl:
Publisher:
publish-pypi.yml on Geeks-Trident-LLC/anyask
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
anyask-0.2.2-py3-none-any.whl -
Subject digest:
e4e69b8d1901f4d58bff0e822114af2f4672eccb555d442f53578a0c7dbd51f9 - Sigstore transparency entry: 2349424819
- Sigstore integration time:
-
Permalink:
Geeks-Trident-LLC/anyask@10861360e239a13a0627707c0e8bee845b7fb3ef -
Branch / Tag:
refs/tags/v0.2.2 - Owner: https://github.com/Geeks-Trident-LLC
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish-pypi.yml@10861360e239a13a0627707c0e8bee845b7fb3ef -
Trigger Event:
release
-
Statement type: