Skip to main content

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 records, ingest, search, schemas, connectors, collections, keys, export
QanatixOpen() None search, collections
AsyncQanatix("sk_live_...") API key All above, 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
  • Schemas — register and retrieve JSON Schemas
  • Connectors — pull from PostgreSQL, MySQL, MongoDB, Neo4j
  • Collections — list and update collection metadata
  • API Keys — create, list, revoke, rotate
  • Webhooksverify_signature() for incoming webhook payloads
  • Sync + AsyncQanatix / 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.schemas.register(col, type, schema) Register a schema
qx.schemas.list(...) List schemas
qx.schemas.get(col, type) Get a schema
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.export(col, format) Stream export

Docs

Full documentation at qanatix.dev/docs/getting-started/python-sdk

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

qanatix-0.1.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.

qanatix-0.1.0-py3-none-any.whl (14.7 kB view details)

Uploaded Python 3

File details

Details for the file qanatix-0.1.0.tar.gz.

File metadata

  • Download URL: qanatix-0.1.0.tar.gz
  • Upload date:
  • Size: 14.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for qanatix-0.1.0.tar.gz
Algorithm Hash digest
SHA256 a6cb5aa3045fa62b596bc74ce0f901ef78526f1f49e051cc2db9ae5428158623
MD5 6efec4cd1698f1d8bc852f31e005730e
BLAKE2b-256 b0f7731297d41ec59ab026d78bec1a7c0727831edc65f20ec7b398baa30376d4

See more details on using hashes here.

Provenance

The following attestation bundles were made for qanatix-0.1.0.tar.gz:

Publisher: publish.yml on qanatix/qanatix-python

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

File details

Details for the file qanatix-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: qanatix-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 14.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for qanatix-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 ea032c5e7500ef45ef2b2d6cbf7d00dfc167cdaa46c006b46ce3d5f3db1a7794
MD5 d0901a31bddf11af028422fdd9625112
BLAKE2b-256 c0676d28ea04ddb076f0775aaccaaa3a26de67badcb727dae3b035ce1ca8c2bc

See more details on using hashes here.

Provenance

The following attestation bundles were made for qanatix-0.1.0-py3-none-any.whl:

Publisher: publish.yml on qanatix/qanatix-python

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