Skip to main content

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

andlake-0.1.1.tar.gz (12.3 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

andlake-0.1.1-py3-none-any.whl (13.5 kB view details)

Uploaded Python 3

File details

Details for the file andlake-0.1.1.tar.gz.

File metadata

  • Download URL: andlake-0.1.1.tar.gz
  • Upload date:
  • Size: 12.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.1

File hashes

Hashes for andlake-0.1.1.tar.gz
Algorithm Hash digest
SHA256 6ec6f69c4251eef14877c95f2b777edd34bd088b1115dfa0c71c3afeb42f4e24
MD5 436f9f70deb60fa7f6a8ec6b4ac41d33
BLAKE2b-256 c246864c4d11499e8d6042f8a863374955ea79dad01ad77e00a0871ae47192a2

See more details on using hashes here.

File details

Details for the file andlake-0.1.1-py3-none-any.whl.

File metadata

  • Download URL: andlake-0.1.1-py3-none-any.whl
  • Upload date:
  • Size: 13.5 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.1

File hashes

Hashes for andlake-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 e795606d5c77a4516e00faa77ca1f4c2799da6b000a6a7f5a1d5ca43050f9c73
MD5 450e3f7746c9930dad083661eaf35d2b
BLAKE2b-256 c9e808df28544173fd39cc81d635ec220e43d62bfa3e4490bc85aaf80ad381e2

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page