Skip to content

Docs/readme ibis examples#1

Merged
eddietejeda merged 3 commits into
mainfrom
docs/readme-ibis-examples
May 7, 2026
Merged

Docs/readme ibis examples#1
eddietejeda merged 3 commits into
mainfrom
docs/readme-ibis-examples

Conversation

@eddietejeda
Copy link
Copy Markdown
Contributor

No description provided.

Replace httpx-based HotdataClient with the official OpenAPI client
(hotdata>=0.1): QueryApi, ConnectionsApi, InformationSchemaApi,
UploadsApi, DatasetsApi. Map ApiException to HotdataAPIError.

Expose list_connections/get_information_schema on the client; add
upload_file and create_dataset_from_upload on Backend for dataset
creation from uploads. Update tests for SDK response validation and
README dependency note.
- Trim README; document Ibis table/execute workflows and federation prefix
- Add examples/04_ibis_table_workflows.py (TPC-H via con.sql + chains)
Comment thread src/ibis_hotdata/http.py Outdated
body=r.text,
)
return r.json()
return
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: (not blocking) close() no longer releases the underlying client. The previous implementation called self._client.close(); the OpenAPI-generated ApiClient owns a urllib3 PoolManager that should be closed to release sockets. Tests call client.close() after each test, so any leak is invisible there but accumulates in long-running processes.

Suggested change
return
def close(self) -> None:
self._client.close()

Comment thread pyproject.toml Outdated
dependencies = [
"ibis-framework>=10.0,<11",
"hotdata>=0.1.0",
"httpx>=0.27",
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

super nit: (not blocking) httpx is no longer used by src/ibis_hotdata after this PR — only examples/_helpers.py still imports it, and examples aren't packaged. Consider moving httpx to the dev dependency group (or dropping it entirely if examples can be ported to the SDK too).

Comment thread src/ibis_hotdata/http.py
msg = f"Hotdata API error: {exc.reason}"
if exc.body:
msg = f"{msg} {exc.body}"
return HotdataAPIError(msg.strip(), status_code=exc.status, body=exc.body)
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

super nit: (not blocking) exc.body from the SDK is often raw bytes — when interpolated into the f-string it renders as b'...' in the user-facing message. Decoding once would clean that up:

Suggested change
return HotdataAPIError(msg.strip(), status_code=exc.status, body=exc.body)
def _from_api_exception(exc: ApiException) -> HotdataAPIError:
body = exc.body
if isinstance(body, (bytes, bytearray)):
body = body.decode("utf-8", errors="replace")
msg = f"Hotdata API error: {exc.reason}"
if body:
msg = f"{msg} {body}"
return HotdataAPIError(msg.strip(), status_code=exc.status, body=exc.body)

claude[bot]
claude Bot previously approved these changes May 7, 2026
…ly httpx

- HotdataClient.close: call ApiClient.close if present else pool_manager.clear
- _from_api_exception: decode bytes body for readable messages
- Move httpx to dependency-groups dev; README uv sync --group dev
@eddietejeda eddietejeda merged commit a6a1870 into main May 7, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant