Skip to content

Python client quickstart

The official client is datalab-api. Use it rather than hand-rolling HTTP: it tracks server-side changes, and handles auth, pagination and file uploads for you.

Install

pip install datalab-api

Connect

from datalab_api import DatalabClient

# Reads DATALAB_API_KEY from the environment.
with DatalabClient("https://demo.datalab-org.io") as client:
    info = client.get_info()

Find out what your instance supports

# TODO: fill in the calls that enumerate available item types and installed blocks.

List and fetch items

# TODO: listing with filters; fetching one item by refcode.

Create an item

# TODO: minimal create call, and the same with metadata.

Attach a file

# TODO: upload and attach.