Andlake platform SDK — pre-configured connections to Trino, Nessie, MLflow, S3, and Iceberg.
Project description
andlake-sdk
Pre-configured Python SDK for the Andlake data platform. Provides zero-config access to Trino, Nessie, MLflow, S3, and Iceberg from JupyterHub notebooks.
Quick Start
from andlake import get_trino_connection, configure_mlflow
import pandas as pd
# Connect to Trino via the Andlake gateway
conn = get_trino_connection()
df = pd.read_sql("SELECT * FROM lake.silver.transactions LIMIT 1000", conn)
# Set up MLflow experiment tracking
configure_mlflow(experiment_name="fraud-detection")
Available Functions
| Function | Description |
|---|---|
get_trino_connection() |
Trino DBAPI connection via the gateway |
get_trino_engine() |
SQLAlchemy engine for pd.read_sql() |
get_nessie_client() |
Nessie catalog client for branch management |
configure_mlflow() |
Set MLflow tracking URI and experiment |
get_mlflow_client() |
Pre-configured MlflowClient |
get_s3_client() |
boto3 S3 client (uses IRSA) |
get_s3_resource() |
boto3 S3 resource (uses IRSA) |
get_iceberg_catalog() |
PyIceberg REST catalog via Nessie |
Environment Variables
Static service URLs are set by JupyterHub extraEnv. Per-user values are
injected by the pre_spawn_hook from Keycloak auth_state.
| Variable | Default | Source |
|---|---|---|
ANDLAKE_GATEWAY_URL |
http://notebook-service:8082 |
extraEnv |
TRINO_HOST |
notebook-service |
extraEnv |
TRINO_PORT |
8082 |
extraEnv |
NESSIE_URI |
http://nessie:19120/api/v2 |
extraEnv |
MLFLOW_TRACKING_URI |
http://mlflow:5000 |
extraEnv |
ANDLAKE_DEFAULT_CATALOG |
lake |
extraEnv |
ANDLAKE_S3_BUCKET |
andlake-app |
extraEnv |
ANDLAKE_TENANT_ID |
(required) | pre_spawn_hook |
ANDLAKE_ACCESS_TOKEN |
(required) | pre_spawn_hook |
Development
pip install -e ".[dev]"
pytest
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
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 andlake-0.1.5.tar.gz.
File metadata
- Download URL: andlake-0.1.5.tar.gz
- Upload date:
- Size: 13.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.13.1
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
9a399b3935f9ce79036497bd77efdd194a9e3f7e8db0ae8aa91a3e4a974b5e6e
|
|
| MD5 |
d6768452599038c97093fa0ba2c1519e
|
|
| BLAKE2b-256 |
bbfa0deab3c5a39a90d5d666424670d79efcb50227857bcc1957d3f79b5fef97
|
File details
Details for the file andlake-0.1.5-py3-none-any.whl.
File metadata
- Download URL: andlake-0.1.5-py3-none-any.whl
- Upload date:
- Size: 15.5 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.13.1
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
d2eac5781d14de546973ff15abe4adfae8fc392cf475d77b8269d2d6518f66ad
|
|
| MD5 |
5486a59ab3f093057f922cc99f76e601
|
|
| BLAKE2b-256 |
8b3a5b56c88763aa6f2b51705cfad39b047c28fa98d31f7b8a559bca4376bfd9
|