Altertable Lakehouse Python SDK
Official Python SDK for the Altertable Lakehouse API.
Installation
pip install altertable-lakehouse
Ibis
pip install 'altertable-lakehouse[ibis]'
import ibis
con = ibis.altertable.connect(
username="your_username", password="your_password",
catalog="my_catalog", database="my_schema",
)
orders = con.table("orders")
totals = orders.group_by("customer_id").aggregate(total=orders.amount.sum())
print(totals.execute())
con.disconnect()
database means schema. Queries run remotely; results are buffered in memory.
Writes use the SDK directly. See the runnable example.
marimo
Use the Ibis connection with mo.sql(query, engine=con). Try the
notebook with ALTERTABLE_USERNAME and
ALTERTABLE_PASSWORD set:
pip install -e '.[ibis]' marimo
marimo edit examples/marimo_notebook.py
Use marimo's Datasources panel to add SQL cells for your own tables.
Usage
Initialization
from altertable_lakehouse import Client
client = Client(username="your_username", password="your_password")
# Disable TLS certificate verification for development only
client = Client(username="your_username", password="your_password", verify=False)
Querying
from altertable_lakehouse.models import QueryRequest
# Stream rows (good for large datasets)
req = QueryRequest(statement="SELECT * FROM my_table")
metadata, columns, row_iterator = client.query(req)
print(metadata.values)
print(columns)
for row in row_iterator:
print(row)
# Accumulate all rows in memory
result = client.query_all(req)
print(result.metadata.values)
print(result.columns)
print(result.rows)
Append
res = client.append(
catalog="my_cat",
schema="my_schema",
table="my_table",
data={"col1": "val1"},
sync=False,
)
print(res.ok)
if res.task_id:
task = client.get_task(res.task_id)
print(task.status)
Upsert
with open("data.csv", "rb") as f:
client.upsert(
catalog="my_cat",
schema="my_schema",
table="my_table",
primary_key="id",
content=f.read(),
)
Upload
from altertable_lakehouse.models import UploadMode
with open("data.csv", "rb") as f:
client.upload(
catalog="my_cat",
schema="my_schema",
table="my_table",
mode=UploadMode.CREATE,
content=f,
content_type="text/csv",
)
Validate Query
from altertable_lakehouse.models import ValidateRequest
res = client.validate(ValidateRequest(statement="SELECT * FROM non_existent"))
print(res.valid)
print(res.connections_errors)
Query Log & Cancellation
# Get query status
log_res = client.get_query("query_uuid_here")
print(log_res.progress)
# Cancel a query
cancel_res = client.cancel_query("query_uuid_here", "session_id_here")
print(cancel_res.cancelled)
Autocomplete
from altertable_lakehouse.models import AutocompleteRequest
res = client.autocomplete(AutocompleteRequest(statement="SEL", max_suggestions=5))
print(res.statement)
print([suggestion.suggestion for suggestion in res.suggestions])
Metadata
Release files for altertable-lakehouse 0.5.1
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 | Actions |
|---|---|---|---|---|
| altertable_lakehouse-0.5.1.tar.gz | 9.7 kB | With provenance | Details for altertable_lakehouse-0.5.1.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| altertable_lakehouse-0.5.1-py3-none-any.whl | Python 3 | none | any | Details for altertable_lakehouse-0.5.1-py3-none-any.whl |
Total release size: 20.5 kB
Release files / altertable_lakehouse-0.5.1.tar.gz
| Download URL | altertable_lakehouse-0.5.1.tar.gz |
|---|---|
| Size | 9.7 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
2776b0e620c01ffc1e4e27e5ab8fe4f4ce3d16c67cfbba31dd2ca126c9ced2be
|
|
BLAKE2b-256 checksum How to use checksums |
a508eb3d8ce6f0ac72bfc218ba282210787aa0123bcf9936f311a142a0dc48a1
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
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 Oct 5, 2026.
Transparency logRelease files / altertable_lakehouse-0.5.1-py3-none-any.whl
| Download URL | altertable_lakehouse-0.5.1-py3-none-any.whl |
|---|---|
| Size | 10.8 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
873ce69ac779267052131d6520f4616e8caafbe82c63f736cb44aa1e10dcc1bd
|
|
BLAKE2b-256 checksum How to use checksums |
dc186068f10d7d90b76420963f0a6e82b039d0136c72ee42e84ee4c4cbaab181
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
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 Oct 5, 2026.
Transparency logSecurity for altertable-lakehouse 0.5.1
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 altertable_lakehouse-0.5.1.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 Oct 5, 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.
To learn more about protecting yourself from malicious actors, visit our package security documentation.