Skip to main content

Hotdata API

Project description

hotdata

Official Python client for the Hotdata HTTP API: workspaces, connections, datasets, SQL queries, results, secrets, uploads, indexes, jobs, embedding providers, and workspace context.

Requirements

Python 3.9+

Install

pip install hotdata

For an unreleased revision:

pip install "git+https://github.com/hotdata-dev/sdk-python.git"

From a local checkout (editable):

pip install -e .

Authentication

The API uses an API key sent as Authorization: Bearer <key>, plus an X-Workspace-Id header on requests scoped to a workspace.

import hotdata

configuration = hotdata.Configuration(
    api_key="YOUR_API_KEY",
    workspace_id="YOUR_WORKSPACE_ID",
)

host defaults to https://api.hotdata.dev. Override it if you target another environment.

Usage

import hotdata
from hotdata.rest import ApiException

configuration = hotdata.Configuration(
    api_key="YOUR_API_KEY",
    workspace_id="YOUR_WORKSPACE_ID",
)

with hotdata.ApiClient(configuration) as api_client:
    workspaces = hotdata.WorkspacesApi(api_client)
    try:
        response = workspaces.list_workspaces()
    except ApiException as e:
        print(f"API error: {e.status} {e.reason}\n{e.body}")

Each Api class groups endpoints by resource. Construct the client, then call the typed methods you need.

Arrow results

Query results can be fetched as an Apache Arrow IPC stream instead of JSON, which is faster and far more memory-efficient for large result sets. Install the optional extra:

pip install 'hotdata[arrow]'

Use hotdata.arrow.ResultsApi (a drop-in subclass of ResultsApi that adds Arrow methods):

from hotdata import ApiClient, Configuration
from hotdata.arrow import ResultsApi

with ApiClient(Configuration(api_key="...", workspace_id="...")) as client:
    results = ResultsApi(client)

    # Buffered: returns a pyarrow.Table.
    table = results.get_result_arrow(result_id)

    # Streaming: yields a pyarrow.RecordBatchStreamReader without
    # materializing the full table in memory.
    with results.stream_result_arrow(result_id) as reader:
        for batch in reader:
            ...

Both methods accept offset and limit for pagination. They raise hotdata.arrow.ResultNotReadyError if the result is still pending or processing — poll results.get_result(result_id) until status == "ready" first.

API reference

Generated Markdown for every operation and model is in docs/:

  • Resource APIs: docs/*Api.md (for example QueryApi.md)
  • Request and response models: docs/<ModelName>.md

Support

Questions and issues: github.com/hotdata-dev/sdk-python.

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

hotdata-0.2.6.tar.gz (121.9 kB view details)

Uploaded Source

Built Distribution

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

hotdata-0.2.6-py3-none-any.whl (286.2 kB view details)

Uploaded Python 3

File details

Details for the file hotdata-0.2.6.tar.gz.

File metadata

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

File hashes

Hashes for hotdata-0.2.6.tar.gz
Algorithm Hash digest
SHA256 e52158791f863b1df30391e3a1cfd23f0415a024d26be836a534b6153aa71508
MD5 26d702f475a4db479559709e4c9ca9fe
BLAKE2b-256 df72703c9a5b531e0283189571b247e78f5a7f1e31546116b23ed82f5d7897b7

See more details on using hashes here.

Provenance

The following attestation bundles were made for hotdata-0.2.6.tar.gz:

Publisher: publish.yml on hotdata-dev/sdk-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 hotdata-0.2.6-py3-none-any.whl.

File metadata

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

File hashes

Hashes for hotdata-0.2.6-py3-none-any.whl
Algorithm Hash digest
SHA256 a498c709cf9ca43949b7cd5094bea2000c27b8fe5fde171be8b458d55225ccc5
MD5 4557a290bdff19d793ee842a7a77a3cc
BLAKE2b-256 380c125b999f3bf99944ef6cb8e1f5b11a65fba68ab257b3974470dba67a0c4a

See more details on using hashes here.

Provenance

The following attestation bundles were made for hotdata-0.2.6-py3-none-any.whl:

Publisher: publish.yml on hotdata-dev/sdk-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