Python SDK for the Qanatix API — ingest, search, and manage structured data for AI agents.
Project description
Qanatix Python SDK
The official Python SDK for Qanatix — ingest, search, and manage structured data for AI agents.
Install
pip install qanatix
With pandas support:
pip install qanatix[pandas]
Quick start
import qanatix
qx = qanatix.Qanatix("sk_live_...")
# Search
results = qx.search("parts_catalog", "stainless M8 bolt")
for r in results.results:
print(r.name, r.score)
# Ingest
result = qx.ingest.batch("parts_catalog", "fastener", [
{"name": "Hex Bolt M8x40", "material": "stainless", "price_eur": 0.12},
{"name": "Hex Nut M8", "material": "carbon steel", "price_eur": 0.04},
])
print(f"Accepted: {result.summary.accepted}")
# Records
rec = qx.records.create("parts_catalog", "fastener", "New Part", {"price_eur": 1.50})
print(rec.record_id)
Public data (no API key)
import qanatix
qx = qanatix.QanatixOpen()
results = qx.search("suppliers", "ISO 9001 certified Germany")
collections = qx.collections.list()
Async
import qanatix
# Private
async with qanatix.AsyncQanatix("sk_live_...") as qx:
results = await qx.search("parts_catalog", "stainless bolt")
# Open
async with qanatix.AsyncQanatixOpen() as qx:
results = await qx.search("suppliers", "CNC machining Germany")
Clients
| Client | Auth | Resources |
|---|---|---|
Qanatix("sk_live_...") |
API key | All resources |
QanatixOpen() |
None | search, collections |
AsyncQanatix("sk_live_...") |
API key | All resources, async |
AsyncQanatixOpen() |
None | search, collections, async |
Features
- Search — full-text + filters, auto-paginating iterator via
qx.search.iter() - Ingest — batch JSON, file upload (CSV/JSON/XML), DataFrame support
- Auto-chunking — batches >5,000 records split automatically
- Retry — exponential backoff on 429/502/503/504
- Records — CRUD + bulk update/delete
- Connectors — pull from PostgreSQL, MySQL, MongoDB, Neo4j
- Collections — list and update collection metadata
- API Keys — create, list, revoke, rotate
- Webhooks — create, list, test, and delete webhook subscriptions +
verify_signature()for incoming payloads - Sync + Async —
Qanatix/AsyncQanatix+QanatixOpen/AsyncQanatixOpen
All methods
| Method | Description |
|---|---|
qx.search(col, query, ...) |
Search a collection |
qx.search.iter(col, query, ...) |
Auto-paginate search results |
qx.records.create(...) |
Create a record |
qx.records.get(id) |
Get a record by ID |
qx.records.list(...) |
List records |
qx.records.update(id, ...) |
Update a record |
qx.records.delete(id) |
Delete a record |
qx.records.bulk_update(ids, ...) |
Bulk update records |
qx.records.bulk_delete(ids) |
Bulk delete records |
qx.ingest.batch(col, type, records) |
Ingest JSON batch |
qx.ingest.upload(col, type, path) |
Upload file |
qx.ingest.from_dataframe(col, type, df) |
Ingest from DataFrame |
qx.ingest.status(upload_id) |
Check upload status |
qx.ingest.errors(upload_id) |
Get upload errors |
qx.connectors.create(...) |
Create a connector |
qx.connectors.list() |
List connectors |
qx.connectors.pull(id) |
Trigger a pull |
qx.connectors.delete(id) |
Delete a connector |
qx.collections.list() |
List collections |
qx.collections.update(name, ...) |
Update collection metadata |
qx.keys.create(name, scopes) |
Create an API key |
qx.keys.list() |
List API keys |
qx.keys.revoke(id) |
Revoke an API key |
qx.keys.rotate(id) |
Rotate an API key |
qx.webhooks.create(url, events, ...) |
Create a webhook subscription |
qx.webhooks.list() |
List webhooks |
qx.webhooks.delete(id) |
Delete a webhook |
qx.webhooks.test(id) |
Send a test event |
qx.webhooks.deliveries(id) |
View delivery history |
qx.chat(message, history) |
Ask questions about your data in natural language |
qx.export(col, format) |
Stream export |
Chat
Ask questions about your data in natural language — Qanatix handles the rest:
answer = qx.chat("Show me ETFs with fees under 0.1%")
print(answer)
# With conversation history
answer = qx.chat("Compare them by AUM", history=[
{"role": "user", "content": "Show me ETFs with fees under 0.1%"},
{"role": "assistant", "content": "...previous answer..."},
])
Each chat message counts as 1 search against your quota.
Docs
Full documentation at qanatix.dev/docs/getting-started/python-sdk
License
MIT
Project details
Release history Release notifications | RSS feed
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 qanatix-1.0.0.tar.gz.
File metadata
- Download URL: qanatix-1.0.0.tar.gz
- Upload date:
- Size: 19.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
a59ebd820f60a6903aa377a33ae554854eb1fdb9fe39fd8457bb0c1f7a0b2869
|
|
| MD5 |
a987d83901a83b3af926d6285108dcd2
|
|
| BLAKE2b-256 |
2881c0eb5634925013339948bf16967a78dd53548dec8c9120b7f4d1e11d9508
|
Provenance
The following attestation bundles were made for qanatix-1.0.0.tar.gz:
Publisher:
publish.yml on qanatix/qanatix-python
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
qanatix-1.0.0.tar.gz -
Subject digest:
a59ebd820f60a6903aa377a33ae554854eb1fdb9fe39fd8457bb0c1f7a0b2869 - Sigstore transparency entry: 1243378051
- Sigstore integration time:
-
Permalink:
qanatix/qanatix-python@36c7a13f49e83cad5ad59305a355025d89462fdd -
Branch / Tag:
refs/tags/v1.0.0 - Owner: https://github.com/qanatix
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@36c7a13f49e83cad5ad59305a355025d89462fdd -
Trigger Event:
release
-
Statement type:
File details
Details for the file qanatix-1.0.0-py3-none-any.whl.
File metadata
- Download URL: qanatix-1.0.0-py3-none-any.whl
- Upload date:
- Size: 16.1 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
062b5b2ad5f6786edb28eae34605861e5e732dc9930f2ef5c6f702bc96c07e49
|
|
| MD5 |
14c461b00a41dbb60e5340b7c062041d
|
|
| BLAKE2b-256 |
ce65808750b94c1607d30828bc617e31d2aac0f586448588a8f2df97e6d28e43
|
Provenance
The following attestation bundles were made for qanatix-1.0.0-py3-none-any.whl:
Publisher:
publish.yml on qanatix/qanatix-python
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
qanatix-1.0.0-py3-none-any.whl -
Subject digest:
062b5b2ad5f6786edb28eae34605861e5e732dc9930f2ef5c6f702bc96c07e49 - Sigstore transparency entry: 1243378058
- Sigstore integration time:
-
Permalink:
qanatix/qanatix-python@36c7a13f49e83cad5ad59305a355025d89462fdd -
Branch / Tag:
refs/tags/v1.0.0 - Owner: https://github.com/qanatix
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@36c7a13f49e83cad5ad59305a355025d89462fdd -
Trigger Event:
release
-
Statement type: