Skip to main content

querais

Python client for QueraIS — the decentralized AI inference marketplace. Anyone with a GPU serves models and earns; you buy inference through one OpenAI-compatible endpoint.

pip install querais
from querais import QueraisClient

client = QueraisClient("https://gateway.querais.xyz", api_key="sk-...")
result = client.chat([{"role": "user", "content": "hello"}], model="llama3.2")
print(result.content)

OpenAI-compatible

The gateway speaks the OpenAI chat-completions protocol, so the official openai package works too — point it at the gateway:

from openai import OpenAI

client = OpenAI(base_url="https://gateway.querais.xyz/v1", api_key="sk-...")

This package is thin sugar over that protocol plus QueraIS-specific helpers.

Streaming

for delta in client.chat_stream([{"role": "user", "content": "tell me a story"}], model="llama3.2"):
    print(delta, end="", flush=True)

QueraIS extras

client.models()  # model ids served by connected nodes
client.nodes()  # public node directory: reputation, prices, dimensions
client.stats()  # network stats
client.model_manifest()  # the gateway's signed model-digest manifest (404 if unpinned)

Routing extensions on chat() / chat_stream():

client.chat(
    messages,
    model="llama3.2",
    max_price_per_1k_tokens=0.5,  # cap what you pay
    min_reputation=0.7,
)  # floor the node quality

LangChain / LlamaIndex

The integrations return the official LangChain / LlamaIndex OpenAI classes configured for the gateway — nothing reimplemented:

pip install 'querais[langchain]'   # or 'querais[llamaindex]'
from querais.langchain import chat_model

llm = chat_model("https://gateway.querais.xyz", api_key="sk-...", model="llama3.2")

from querais.llamaindex import llm as qllm

llm = qllm("https://gateway.querais.xyz", api_key="sk-...", model="llama3.2")

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

querais-0.4.0.tar.gz (14.8 kB view details)

Uploaded Source

Built Distribution

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

querais-0.4.0-py3-none-any.whl (10.5 kB view details)

Uploaded Python 3

File details

Details for the file querais-0.4.0.tar.gz.

File metadata

  • Download URL: querais-0.4.0.tar.gz
  • Upload date:
  • Size: 14.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/7.0.0 CPython/3.13.14

File hashes

Hashes for querais-0.4.0.tar.gz
Algorithm Hash digest
SHA256 997278c818c122679e8a86808c6ba504c114ba46278010862d6a350b2f31c0c9
MD5 5c13dd5a4e7cc714f3d6c438afa6a884
BLAKE2b-256 50e5df856c645b90a77691e18c8598938597fd3162c716e7d1c7cdb0f8c2a8d5

See more details on using hashes here.

Provenance

The following attestation bundles were made for querais-0.4.0.tar.gz:

Publisher: release.yml on ShavitR/querais

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

File details

Details for the file querais-0.4.0-py3-none-any.whl.

File metadata

  • Download URL: querais-0.4.0-py3-none-any.whl
  • Upload date:
  • Size: 10.5 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/7.0.0 CPython/3.13.14

File hashes

Hashes for querais-0.4.0-py3-none-any.whl
Algorithm Hash digest
SHA256 dde2ce1913053dda363ff7e5f7d4fcd4cd84ce617e63b0dee09302394a60b6f2
MD5 de01d2adb98251d8b62d5c3a33ddcffe
BLAKE2b-256 deb9bd3982cab7655ee686cfad405ab44e15b61f8b20d3bd5ae6dfbd37eedc0e

See more details on using hashes here.

Provenance

The following attestation bundles were made for querais-0.4.0-py3-none-any.whl:

Publisher: release.yml on ShavitR/querais

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

Release history Release notifications | RSS feed

0.4.1

2 files

This release

0.4.0 This release

2 files

0.3.0

2 files

0.2.6

2 files

0.2.5

2 files

0.2.4

2 files

0.2.3

2 files

0.2.2

2 files

0.2.1

2 files

0.2.0

2 files

Supported by

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