Official Python SDK for Altertable Lakehouse API
Project description
Altertable Lakehouse Python SDK
Official Python SDK for the Altertable Lakehouse API.
Installation
pip install altertable-lakehouse
Usage
Initialization
from altertable_lakehouse import Client
client = Client(username="your_username", password="your_password")
Querying
from altertable_lakehouse.models import QueryRequest
# Stream rows (good for large datasets)
req = QueryRequest(statement="SELECT * FROM my_table")
metadata, row_iterator = client.query(req)
for row in row_iterator:
print(row)
# Accumulate all rows in memory
result = client.query_all(req)
print(result.rows)
Append
res = client.append(catalog="my_cat", schema="my_schema", table="my_table", data={"col1": "val1"})
print(res.ok)
Upload
from altertable_lakehouse.models import UploadFormat, UploadMode
with open("data.csv", "rb") as f:
client.upload(
catalog="my_cat",
schema="my_schema",
table="my_table",
format=UploadFormat.CSV,
mode=UploadMode.APPEND,
content=f.read()
)
Validate Query
res = client.validate("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)
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file altertable_lakehouse-0.2.0.tar.gz.
File metadata
- Download URL: altertable_lakehouse-0.2.0.tar.gz
- Upload date:
- Size: 4.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
f4c17074b338b93d7d62de092d0c8c928be558afb349835f5353c5e57f250dcd
|
|
| MD5 |
82dc8fa753d7ccede41b582acfab0548
|
|
| BLAKE2b-256 |
3ab2b4082b87a175e01cebc3ce3713bdbbca0c2b751e91457802c6377dab8405
|
Provenance
The following attestation bundles were made for altertable_lakehouse-0.2.0.tar.gz:
Publisher:
release-please.yml on altertable-ai/altertable-lakehouse-python
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
altertable_lakehouse-0.2.0.tar.gz -
Subject digest:
f4c17074b338b93d7d62de092d0c8c928be558afb349835f5353c5e57f250dcd - Sigstore transparency entry: 1074354336
- Sigstore integration time:
-
Permalink:
altertable-ai/altertable-lakehouse-python@4a113eee4aa6917ecd3e32fe960291b4611dea0d -
Branch / Tag:
refs/heads/main - Owner: https://github.com/altertable-ai
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release-please.yml@4a113eee4aa6917ecd3e32fe960291b4611dea0d -
Trigger Event:
push
-
Statement type:
File details
Details for the file altertable_lakehouse-0.2.0-py3-none-any.whl.
File metadata
- Download URL: altertable_lakehouse-0.2.0-py3-none-any.whl
- Upload date:
- Size: 6.3 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
c3d9580b0db919e113b679295f8c5c5d58ef2a4471d8bb66d701039c5d68953c
|
|
| MD5 |
41ca86de04b255c1ac637a74988bd8b1
|
|
| BLAKE2b-256 |
2e651d2d55e17993b2009054ca2601870d4d29d6e71d5a08b741749abd8c066f
|
Provenance
The following attestation bundles were made for altertable_lakehouse-0.2.0-py3-none-any.whl:
Publisher:
release-please.yml on altertable-ai/altertable-lakehouse-python
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
altertable_lakehouse-0.2.0-py3-none-any.whl -
Subject digest:
c3d9580b0db919e113b679295f8c5c5d58ef2a4471d8bb66d701039c5d68953c - Sigstore transparency entry: 1074354341
- Sigstore integration time:
-
Permalink:
altertable-ai/altertable-lakehouse-python@4a113eee4aa6917ecd3e32fe960291b4611dea0d -
Branch / Tag:
refs/heads/main - Owner: https://github.com/altertable-ai
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release-please.yml@4a113eee4aa6917ecd3e32fe960291b4611dea0d -
Trigger Event:
push
-
Statement type: