Python client for QueraIS, the decentralized AI inference marketplace. OpenAI-shaped chat/streaming plus QueraIS extras: nodes, stats, model manifest.
Project description
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
Project details
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 querais-0.2.6.tar.gz.
File metadata
- Download URL: querais-0.2.6.tar.gz
- Upload date:
- Size: 7.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
d9bd78982620fc09fbe42df4e7a37c4a5555e9c7adec5e882c38d81884db1d08
|
|
| MD5 |
c138d353932b5746b8e952797851d492
|
|
| BLAKE2b-256 |
5d48b339e44241db63faf23834d4c9919baf0121a9bef1ecddb9f2b7f83f8a46
|
Provenance
The following attestation bundles were made for querais-0.2.6.tar.gz:
Publisher:
release.yml on ShavitR/querais
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
querais-0.2.6.tar.gz -
Subject digest:
d9bd78982620fc09fbe42df4e7a37c4a5555e9c7adec5e882c38d81884db1d08 - Sigstore transparency entry: 1809893795
- Sigstore integration time:
-
Permalink:
ShavitR/querais@0b48f306219a326224640299631acba126a0e1bb -
Branch / Tag:
refs/tags/v0.2.9 - Owner: https://github.com/ShavitR
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@0b48f306219a326224640299631acba126a0e1bb -
Trigger Event:
push
-
Statement type:
File details
Details for the file querais-0.2.6-py3-none-any.whl.
File metadata
- Download URL: querais-0.2.6-py3-none-any.whl
- Upload date:
- Size: 7.0 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
9ba8eb94ce82608075af6851193371dce25463a15ea768b4ef239c6b6140883f
|
|
| MD5 |
44dae6196a0d849126e643a992a3f2f9
|
|
| BLAKE2b-256 |
80956e256038942f19bf7f5d9c1ed6cff7163babb483d31cdb4588e2f03b7832
|
Provenance
The following attestation bundles were made for querais-0.2.6-py3-none-any.whl:
Publisher:
release.yml on ShavitR/querais
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
querais-0.2.6-py3-none-any.whl -
Subject digest:
9ba8eb94ce82608075af6851193371dce25463a15ea768b4ef239c6b6140883f - Sigstore transparency entry: 1809893817
- Sigstore integration time:
-
Permalink:
ShavitR/querais@0b48f306219a326224640299631acba126a0e1bb -
Branch / Tag:
refs/tags/v0.2.9 - Owner: https://github.com/ShavitR
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@0b48f306219a326224640299631acba126a0e1bb -
Trigger Event:
push
-
Statement type: