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.1.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.1-py3-none-any.whl (38.5 kB view details)

Uploaded Python 3

File details

Details for the file anyask-0.2.1.tar.gz.

File metadata

  • Download URL: anyask-0.2.1.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.1.tar.gz
Algorithm Hash digest
SHA256 d1a076c72cccff502c2008102976f032b84cf157eba30a3686566f0e8ffb2b5b
MD5 59e2c5d0087f722ce3554e977fc0b919
BLAKE2b-256 52758e4173555a1f5bd9df51f5be29ade43c3b8ea229fd57adaf38017661cf98

See more details on using hashes here.

Provenance

The following attestation bundles were made for anyask-0.2.1.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.1-py3-none-any.whl.

File metadata

  • Download URL: anyask-0.2.1-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.1-py3-none-any.whl
Algorithm Hash digest
SHA256 f9f146a9402cfabcd19273c8f2567159e6e2f7fb77eb4ec0017e91882ab5dfe1
MD5 81cf0ca3adcfc9e376981a40cfe3a7bd
BLAKE2b-256 c53e602f61f7b838f19a71b0a9a1afb0b7bc7e1fc1e1447f0bf877516a3b7629

See more details on using hashes here.

Provenance

The following attestation bundles were made for anyask-0.2.1-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