pylakekeeper — Lakekeeper Python Client
Please visit https://docs.lakekeeper.io for Documentation!
pylakekeeper is the official Python client for
Lakekeeper, an Apache-Licensed, secure,
fast and easy to use implementation of the
Apache Iceberg REST Catalog specification.
It covers the two things a plain Iceberg REST client cannot do for you: the
Generic Tables API — register Lance, Delta, Parquet, images or any other dataset
format as first-class catalog tables — and Storage Access Management, mapping
Lakekeeper's vended credentials straight into the keys that lance, boto3, fsspec
and deltalake already expect. If you have questions, feature requests or just want a
chat, we are hanging around in Discord!
Quickstart
pip install pylakekeeper
from pylakekeeper import Client, StaticToken
lk = Client(
base_url="http://localhost:8181",
warehouse="my-warehouse",
auth=StaticToken("my-token"),
)
# Register a Lance dataset as a generic table
lk.generic_tables.create("ai.models", "embeddings", format="lance")
# Load it back with short-lived, vended S3 credentials
resp = lk.generic_tables.load("ai.models", "embeddings", vended=True)
import lance
lance.write_dataset(data, resp.location, storage_options=resp.lance_storage_options)
# ...or open the same location as an fsspec filesystem
import fsspec
fs = fsspec.filesystem("s3", **resp.fsspec_kwargs)
print(fs.ls(resp.location))
Need a running catalog first? The Lakekeeper
Getting Started Guide brings one up with
docker compose in a couple of minutes.
Scope and Features
pylakekeeper is deliberately small: httpx + pydantic, nothing else. It is not a
general-purpose Iceberg REST client — for the standard Iceberg surface use
PyIceberg, which pairs with this happily
(pip install 'pylakekeeper[iceberg]').
- Generic Tables: Register non-Iceberg datasets (Lance, Delta, Parquet, images, HDF5)
as first-class catalog tables and get
create/load/list/dropwithout faking Iceberg metadata. - Vended Credentials:
LoadGenericTableResponseexposeslance_storage_optionsandfsspec_kwargs, so short-lived credentials flow into your reader with no manual key-mapping. - OpenID Provider Integration:
client_credentials,device_codeandauthorization_codeflows, all with automatic token refresh — or just aStaticToken. - Fully Typed: Ships
py.typed; the package is checked undermypy --strict. - Well-Tested: Unit tests plus an integration suite that runs a real round-trip
against Lakekeeper, Postgres, MinIO and Keycloak via
docker compose.
If you are missing something, we would love to hear about it in a GitHub Issue.
Status
Authentication Flows
| Flow | Status | Comment |
|---|---|---|
| Static Token | StaticToken — bring your own bearer token |
|
| OAuth2 Client Credentials | ClientCredentials, refreshes automatically |
|
| OAuth2 Device Code | DeviceCodeFlow — for CLIs and notebooks |
|
| OAuth2 Authorization Code | AuthorizationCodeFlow — local redirect server |
Generic Table Operations
| Operation | Status | Comment |
|---|---|---|
| Create | Any format identifier — see below | |
| Load | Optional credential vending via vended=True |
|
| List | Paginated | |
| Drop | ||
| Rename | Not yet exposed by the client |
GenericTableFormat provides constants for lance, delta, vortex, paimon and
dataset, but Lakekeeper stores the format as a free identifier — any string matching
^[a-z][a-z0-9_-]{0,63}$ is accepted, so pass a plain str for anything not listed.
Storage Backends
| Storage | Status | Comment |
|---|---|---|
| S3 - AWS | Vended credentials mapped to Lance / boto3 / fsspec | |
| S3 - Custom | MinIO, SeaweedFS and friends; allow_http set automatically |
|
| Azure ADLS Gen2 | No credential translation yet — raw vended properties are still available on the response | |
| Google Cloud Storage | No credential translation yet — raw vended properties are still available on the response |
Optional Extras
| Extra | Installs |
|---|---|
pip install 'pylakekeeper[lance]' |
pylance — write and read Lance datasets |
pip install 'pylakekeeper[iceberg]' |
pyiceberg — standard Iceberg catalog surface |
pip install 'pylakekeeper[examples]' |
Everything the notebooks and demo scripts need |
Examples
Runnable scripts and notebooks live in
python/examples/:
| Example | Description |
|---|---|
generic_tables_lance.py |
Create a Lance generic table, write and read a dataset with vended credentials |
dataset_images.py |
Upload image files to a dataset generic table via boto3 |
auth_clientcredentials_delta.ipynb |
OAuth2 client-credentials + a Delta Lake round-trip |
auth_devicecode_lance.ipynb |
Device-code login from a notebook |
auth_devicecode_hdf5.ipynb |
Store HDF5 files in a dataset table |
auth_authcode_vortex.ipynb |
Authorization-code flow with Vortex |
API Reference
| Object | Purpose |
|---|---|
Client |
Entry point; holds base URL, warehouse and auth |
client.generic_tables |
create / load / list / drop generic tables |
StaticToken, ClientCredentials, DeviceCodeFlow, AuthorizationCodeFlow |
Auth strategies |
LoadGenericTableResponse |
Location plus lance_storage_options / fsspec_kwargs |
iceberg_creds_to_lance, iceberg_creds_to_fsspec |
Credential mapping helpers |
All errors derive from LakekeeperError: NotFoundError, ConflictError, AuthError,
ConfigError, LakekeeperHTTPError.
Contributing
The client lives in the lakekeeper-clients monorepo alongside the Java and Spark clients.
git clone https://github.com/lakekeeper/lakekeeper-clients.git
cd lakekeeper-clients/python
pip install -e '.[dev]'
pytest tests/ # unit tests
pytest tests/integration -m integration # needs Docker
License
Licensed under the Apache License, Version 2.0
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 pylakekeeper-0.3.1.tar.gz.
File metadata
- Download URL: pylakekeeper-0.3.1.tar.gz
- Upload date:
- Size: 307.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via:
twine/7.0.0 CPython/3.13.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
f657b43be8f6022eb0fa79cbac3b6f01cda2c577320fd69f536122e068d0c821
|
|
| MD5 |
bcef1bb8f9183615608e85a541cfdc0d
|
|
| BLAKE2b-256 |
7461728828aad3f71a7f7da0468e3a76e68eb6675812cd44d9306f97ed73de1b
|
Provenance
The following attestation bundles were made for pylakekeeper-0.3.1.tar.gz:
Publisher:
release.yml on lakekeeper/lakekeeper-clients
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
pylakekeeper-0.3.1.tar.gz -
Subject digest:
f657b43be8f6022eb0fa79cbac3b6f01cda2c577320fd69f536122e068d0c821 - Sigstore transparency entry: 2333464920
- Sigstore integration time:
-
Permalink:
lakekeeper/lakekeeper-clients@4b1434f2fee6dd1bc6694475d6030f730bee1e9c -
Branch / Tag:
refs/heads/main - Owner: https://github.com/lakekeeper
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@4b1434f2fee6dd1bc6694475d6030f730bee1e9c -
Trigger Event:
push
-
Statement type:
File details
Details for the file pylakekeeper-0.3.1-py3-none-any.whl.
File metadata
- Download URL: pylakekeeper-0.3.1-py3-none-any.whl
- Upload date:
- Size: 20.9 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via:
twine/7.0.0 CPython/3.13.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
9ae77115b8f57fc0d912ea7a2c15ad563bca8c453471677cdd551399734389cd
|
|
| MD5 |
9da32000773c5c43ff548be542ef7c1f
|
|
| BLAKE2b-256 |
de942498344e8bee1ecb284e14d243f80339d6e9a527de386252aed13ef9f980
|
Provenance
The following attestation bundles were made for pylakekeeper-0.3.1-py3-none-any.whl:
Publisher:
release.yml on lakekeeper/lakekeeper-clients
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
pylakekeeper-0.3.1-py3-none-any.whl -
Subject digest:
9ae77115b8f57fc0d912ea7a2c15ad563bca8c453471677cdd551399734389cd - Sigstore transparency entry: 2333464955
- Sigstore integration time:
-
Permalink:
lakekeeper/lakekeeper-clients@4b1434f2fee6dd1bc6694475d6030f730bee1e9c -
Branch / Tag:
refs/heads/main - Owner: https://github.com/lakekeeper
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@4b1434f2fee6dd1bc6694475d6030f730bee1e9c -
Trigger Event:
push
-
Statement type: