Skip to main content

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 anyask pulls 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 vendorsask()/ask_async() take the same provider=/model= signature everywhere; swap providers by changing one string.
  • No routing/fallback magicprovider and model are always explicit; anyask never silently swaps one vendor for another.
  • Real reasoning support, not simulatedreasoning=True enables each provider's own actual extended-thinking mechanism where one exists.
  • A small built-in CLIanyask check/anyask ready answer "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:

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

anyask-0.2.2.tar.gz (25.6 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

anyask-0.2.2-py3-none-any.whl (38.5 kB view details)

Uploaded Python 3

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

Hashes for anyask-0.2.2.tar.gz
Algorithm Hash digest
SHA256 3e8d81f20969be8ea16941bb9bf040da4e0a3529ae615512afc2fa49165fb34f
MD5 b6cae3286aa8b2ff05d374470d68fa95
BLAKE2b-256 1f225fed5899ceaf1a91f5d62c77a6c7a5d7dc42e65d0aae10d41412aa857546

See more details on using hashes here.

Provenance

The following attestation bundles were made for anyask-0.2.2.tar.gz:

Publisher: publish-pypi.yml on Geeks-Trident-LLC/anyask

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

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

Hashes for anyask-0.2.2-py3-none-any.whl
Algorithm Hash digest
SHA256 e4e69b8d1901f4d58bff0e822114af2f4672eccb555d442f53578a0c7dbd51f9
MD5 54289a9c722f7d21e65cd74baba8c3f9
BLAKE2b-256 0e7bc0e3f7d5ee55174c130e80f17ae197d5b8a387a3b67f8f58b2ff4de538c4

See more details on using hashes here.

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

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page