TextQL Python SDK
Official Python SDK for the TextQL Platform API.
Installation
pip install textql
Requires Python 3.9+.
Quickstart
from textql import TextQL
client = TextQL(api_key="tql_...") # or set TEXTQL_API_KEY in the environment
# Ask a question
response = client.chat.create("What was total revenue last quarter?", connector_ids=[1])
print(response["response"])
# Stream a response
for event in client.chat.stream("Summarize sales by region"):
if event["type"] == "text":
print(event["text"], end="", flush=True)
# Upload files with a question
response = client.chat.create(
"Analyze this data",
files=["./sales.csv"],
)
Resources
Chat
client.chat.list(limit=10)
client.chat.create("What connectors are available?")
client.chat.get("chat-uuid")
client.chat.stream("Summarize revenue")
client.chat.cancel("chat-uuid")
Connectors
client.connectors.list()
Playbooks
client.playbooks.list(limit=10)
pb = client.playbooks.create()
client.playbooks.update(pb["id"], name="Weekly Revenue", prompt="Summarize revenue by region")
client.playbooks.deploy(pb["id"])
client.playbooks.run(pb["id"])
client.playbooks.get(pb["id"])
client.playbooks.delete(pb["id"])
Sandbox
sb = client.sandbox.start()
sid = sb["sandbox_id"]
client.sandbox.execute(sid, code="import pandas as pd; print(pd.__version__)")
client.sandbox.query(sid, connector_id=1, query="SELECT * FROM sales LIMIT 10", dataframe_name="sales")
client.sandbox.upload_file(sid, "./data.csv")
client.sandbox.status(sid)
client.sandbox.stop(sid)
Configuration
| Option | Env var | Default |
|---|---|---|
api_key |
TEXTQL_API_KEY |
— (required) |
base_url |
TEXTQL_BASE_URL |
https://app.textql.com |
timeout |
— | 60.0 seconds |
The base_url accepts a bare hostname (e.g. app.textql.com) or a full URL.
Links
License
Metadata
Release files for textql 2.1.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | |
|---|---|---|---|---|
| textql-2.1.0.tar.gz | 16.4 kB | With provenance | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| textql-2.1.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 27.8 kB
Release files / textql-2.1.0.tar.gz
| Download URL | textql-2.1.0.tar.gz |
|---|---|
| Size | 16.4 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
c3731b0034015ad4e4e9c7a7d2a6e986699775e46b07ffe8e03f51b716ce28a3
|
|
BLAKE2b-256 checksum How to use checksums |
0db3cb0e51e1bb140238e00e025598538f1ea93fecf652479b86ae79e4658847
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.12
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Jun 22, 2026.
Transparency logRelease files / textql-2.1.0-py3-none-any.whl
| Download URL | textql-2.1.0-py3-none-any.whl |
|---|---|
| Size | 11.4 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
5106c47a75f13c950d8a5906c9de274e0aa60fc4f22c653f0502afa7a185e9bc
|
|
BLAKE2b-256 checksum How to use checksums |
51eb394f59024af948fc13c8a59f9d2ce2755ca0aa99acf7f52c4ab8a0883e4f
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.12
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Jun 22, 2026.
Transparency logSecurity for textql 2.1.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
Full provenance
All 2 files in this release have been uploaded with provenance metadata.
Attestation for textql-2.1.0.tar.gz
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Jun 22, 2026.
Transparency logA note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.