Skip to main content

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.

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.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for altertable-lakehouse 0.5.0
File Size Uploaded Provenance Actions
altertable_lakehouse-0.5.0.tar.gz 9.4 kB With provenance Details for altertable_lakehouse-0.5.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for altertable-lakehouse 0.5.0
File Interpreter ABI Platform Actions
altertable_lakehouse-0.5.0-py3-none-any.whl Python 3 none any Details for altertable_lakehouse-0.5.0-py3-none-any.whl

Total release size: 20.0 kB

Release files / altertable_lakehouse-0.5.0.tar.gz

Download URL altertable_lakehouse-0.5.0.tar.gz
Size 9.4 kB
Tags Source
SHA-256 checksum
How to use checksums
4ce775adde84b8f5d009cfeaa7424e800b31ac7395916efe80100b7115c015af
BLAKE2b-256 checksum
How to use checksums
11cb4b6f0250ed04e3a5a023ffca89fb29b12107ce3358062e411e3668ace021
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 log

Release files / altertable_lakehouse-0.5.0-py3-none-any.whl

Download URL altertable_lakehouse-0.5.0-py3-none-any.whl
Size 10.6 kB
Tags Python 3
SHA-256 checksum
How to use checksums
89b129aeeeded825da7b6466e209ce8991d5b822ba86b9c534b7dfbf85a547cd
BLAKE2b-256 checksum
How to use checksums
9ae5bc598425dba7bed41abed2f7f33db8036f47acc2132708f79ddcd4a9f592
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 log

Security for altertable-lakehouse 0.5.0

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.

Select from 2 files

Attestation for altertable_lakehouse-0.5.0.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 log

A 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.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page