Skip to main content

databaas-utils

Lakekeeper/Iceberg lakehouse access for Databaas: catalog, remote-signed object storage, an Airflow integration, and user access from notebooks — in JupyterHub or on a laptop.

Notebooks

from databaas_utils.user import get_catalog, get_store, get_zarr_group

catalog = get_catalog()
catalog.load_table("open_meteo.daily_summary").scan(limit=10).to_arrow()

group = get_zarr_group("harmonie_zarr", namespace="knmi", read_only=True)

databaas_utils.user authenticates as the person running the code and picks how by itself (databaas_utils.notebook, its former name, still works):

  • In a Databaas JupyterHub pod it asks the hub for the logged-in user's access token (GET /hub/api/oauth-token, using the JUPYTERHUB_API_URL/JUPYTERHUB_API_TOKEN every singleuser pod has). The catalog is CATALOG_URI (default http://lakekeeper:8181) and the warehouse LAKEKEEPER_WAREHOUSE (default databaas-lakehouse).
  • Anywhere else it uses the session saved by databaas login (below).

So the same notebook runs on the platform and on a laptop. Pass profile= to force a databaas login profile, or warehouse= to override the warehouse. DAGs must not use this module — a task authenticates through its Airflow connection (databaas_utils.airflow).

Local (analyst) quickstart

pip install "databaas-utils[local]"
databaas login https://<your-databaas-domain> --profile <name>

The URL is the portal's address; the Zitadel (auth.) and catalog (catalog.) addresses are derived from it, and the portal serves the client id. databaas login opens a browser to sign in with your own identity and saves the profile, with the session in your OS keychain. Laptop login explains every flag.

from databaas_utils import LakehouseSettings, rest_catalog

settings = LakehouseSettings.from_profile()  # picks up the login from `databaas login`
catalog = rest_catalog(settings)
catalog.list_namespaces()

resolve()/GenericTableStore/open_zarr_group() work the same way once you have settings — see their docstrings. An admin still has to grant your Lakekeeper user (databaas whoami shows its id, oidc~<sub>) access to a warehouse before any of this returns data.

Useful commands:

Command What it does
databaas login URL Log in and save a profile
databaas whoami Show the signed-in email and Lakekeeper user id
databaas token Print a fresh access token (e.g. for curl, DuckDB)
databaas logout Revoke and forget the cached login
databaas profile list / databaas profile use NAME Manage saved profiles

Several environments can be configured at once as named profiles in ~/.config/databaas/config.toml; select one with --profile NAME or DATABAAS_PROFILE.

Deploying DAGs

CI deploys a repo's Airflow code with databaas dag deploy, driven by the repo's databaas.yml. It uses the environment's DAG deployment key from the repository secrets, so it needs no login:

pip install "databaas-utils[deploy]"
AWS_ACCESS_KEY_ID=... AWS_SECRET_ACCESS_KEY=... \
AWS_ENDPOINT_URL=https://s3.nl-ams.scw.cloud DATABAAS_DAGS_BUCKET=<metadata bucket> \
  databaas dag deploy -t prod

databaas dag validate -t prod parses the DAGs with Airflow first, exactly as they would be deployed. It needs Airflow installed, not the key.

A development target deploys under the branch name, with the repo's top-level packages renamed so two branches cannot collide. databaas dag destroy -t dev removes it again. Deploying with your own databaas login, through Lakekeeper and without S3 keys, is coming. Deploying DAGs has the config, the variables and CI examples.

Documentation

Guides and the full API reference live in docs/. Setting up a pipeline's Airflow connection is covered in the Databaas documentation: Creating an Airflow service account. Preview the package docs with:

uv run --group docs --all-extras mkdocs serve

Every public function and class also carries a docstring with arguments, errors and an example, so your editor shows the same content on hover and help(...) works in a notebook.

Metadata

Release files for databaas-utils 0.6.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 databaas-utils 0.6.0
File Size Uploaded
databaas_utils-0.6.0.tar.gz 73.8 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for databaas-utils 0.6.0
File Interpreter ABI Platform
databaas_utils-0.6.0-py3-none-any.whl Python 3 none any Details

Total release size: 166.2 kB

Release files / databaas_utils-0.6.0.tar.gz

Download URL databaas_utils-0.6.0.tar.gz
Size 73.8 kB
Tags Source
SHA-256 checksum
How to use checksums
dd5dc3bc4551963cf80057d78db74390e94a2a11adfa7a8644ae59b9bc22c8d3
BLAKE2b-256 checksum
How to use checksums
149cd21c895cbf03f7d319f4839f423c718400a1805bf469b69cac10d231df87
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 8, 2026.

Transparency log

Release files / databaas_utils-0.6.0-py3-none-any.whl

Download URL databaas_utils-0.6.0-py3-none-any.whl
Size 92.4 kB
Tags Python 3
SHA-256 checksum
How to use checksums
62161608951a91f2fdd2230a78d037ed6e742d40342e326b267c41d7a864996a
BLAKE2b-256 checksum
How to use checksums
8beee86ffe8ec86b21f3281fa6b7eff2d8ab70ed814cfb1b44de08d660df5ca4
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 8, 2026.

Transparency log

Release history Release notifications | RSS feed

This release

0.6.0 This release

2 release files

0.5.3

2 release files

0.5.2

2 release files

0.5.1

2 release files

0.5.0

2 release files

0.4.0

2 release files

0.3.0

2 release files

0.2.1

2 release files

0.2.0

2 release files

0.1.0

2 release files

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