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.1

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.1
File Size Uploaded Provenance Actions
databaas_utils-0.6.1.tar.gz 78.3 kB With provenance Details for databaas_utils-0.6.1.tar.gz

Built distribution (wheel)

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

Total release size: 171.3 kB

Release files / databaas_utils-0.6.1.tar.gz

Download URL databaas_utils-0.6.1.tar.gz
Size 78.3 kB
Tags Source
SHA-256 checksum
How to use checksums
8c05b79fb7e2993b22cf117a80f7138db3d7b09f0f50b0de9893bbf14a3652a1
BLAKE2b-256 checksum
How to use checksums
4c1414f65d21db3f865bd43f1ac574f6f7b7ca8bf8b9ea4c70ec6b171383e1ab
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

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 Nov 25, 2026.

Transparency log

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

Download URL databaas_utils-0.6.1-py3-none-any.whl
Size 92.9 kB
Tags Python 3
SHA-256 checksum
How to use checksums
9fe7de3afde8c1a422e446a9b77941588e9da8e6da7a2d015994a20cffa60811
BLAKE2b-256 checksum
How to use checksums
190edcf0f80cf0f4e83468686842fcbfb57c793d3b79f3f0c2ea2293b01e7d84
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

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 Nov 25, 2026.

Transparency log

Security for databaas-utils 0.6.1

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.

Full provenance

Both files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for databaas_utils-0.6.1.tar.gz

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 Nov 25, 2026.

Transparency log

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

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