Skip to main content

MultiBase

SDK for working with your MultiBase instance in Python.

Proprietary software. All rights reserved. No license is granted for use, modification, or distribution.

pip install multibase-sdk
# or
uv add multibase-sdk

Setup

  1. Create a WorkOS organization API key (WorkOS Dashboard → Organization → API Keys).
  2. Set environment variables:
export MULTIBASE_API_KEY="your-workos-api-key"
# export MULTIBASE_WEBAPP_URL="https://app.eventual.ai" (optional, this is the default)

Usage

from multibase import Client

client = Client()
for project in client.list_projects():
    print(project.name, project.id)
    for collection in client.list_collections(project.name):
        print(" ", collection.name, f"({collection.item_count} items)")
for span in collection:
    print("   ", span.producer, span.start_ts, f"{span.duration_ms}ms")

Fetching sample data

Each collection span covers a time window on a producer. To load the underlying sample rows (the same data the query engine serves), call fetch_samples() on a bound span:

from multibase import Client

client = Client()
collection = client.get_collection("my-project", "Pedestrians")

# Discover available columns (project-scoped Arrow schema)
schema = collection.schema()  # or client.get_schema("my-project") / dataset.schema()
print(schema.names)

for span in collection:
    table = span.fetch_samples()
    print(table.num_rows, table.column_names)
    # Defaults include id, producer, ts, and every camera's
    # frames_<cam>_mp4_path / frames_<cam>_mp4_offset_sec columns.
    # Pass columns=[...] to project additional fields from the schema.
    # Camera stubs like "front_cam" are expanded to footage path/offset
    # columns automatically.

Returns a pyarrow.Table. Convert to pandas with table.to_pandas() if needed.

Concurrent fetches

Use fetch_samples_aio() to load sample data for many spans in parallel with the same Client:

import asyncio

from multibase import Client

async def load_all():
    client = Client()
    collection = client.get_collection("my-project", "Pedestrians")
    spans = list(collection)
    try:
        return await asyncio.gather(*(span.fetch_samples_aio() for span in spans))
    finally:
        await client.aclose()

tables = asyncio.run(load_all())

Datasets

Datasets are immutable snapshots of episodes, created in the webapp. Use them when you want a fixed training set that won't change if the source collection is edited:

from multibase import Client

client = Client()
dataset = client.get_dataset("my-project", "train-v1")
print(dataset.name, dataset.episode_count, dataset.sample_rate_hz)

for episode in dataset:
    table = episode.fetch_samples()
    print(table.num_rows, table.column_names)

PyTorch DataLoader

With the optional torch extra installed (pip install multibase-sdk[torch]), convert a dataset to a PyTorch DataLoader:

loader = dataset.to_torch_dataloader(batch_size=4, num_frames=8, seed=42)
for batch in loader:
    print(batch["front_cam"].shape)  # [batch, T, C, H, W]

To learn more about MultiBase, visit our website.

Metadata

Release files for multibase-sdk 0.0.3

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for multibase-sdk 0.0.3
File Size Uploaded
multibase_sdk-0.0.3.tar.gz 143.8 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for multibase-sdk 0.0.3
File Interpreter ABI Platform
multibase_sdk-0.0.3-py3-none-any.whl Python 3 none any Details

Total release size: 160.7 kB

Release files / multibase_sdk-0.0.3.tar.gz

Download URL multibase_sdk-0.0.3.tar.gz
Size 143.8 kB
Tags Source
SHA-256 checksum
How to use checksums
507e5dc27707bdd410d665acfdc1edcad436e8efae5f555e53e7882f54f5a6f8
BLAKE2b-256 checksum
How to use checksums
6cdde7fb186662a175ecfdb70012cb5e4aee56f9561af7ebddf8e0e37b02693d
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.10.11 {"installer":{"name":"uv","version":"0.10.11","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"macOS","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

Release files / multibase_sdk-0.0.3-py3-none-any.whl

Download URL multibase_sdk-0.0.3-py3-none-any.whl
Size 16.8 kB
Tags Python 3
SHA-256 checksum
How to use checksums
9d68bb13796f87c08b306d96deca111b15fbfdacab403b713bb3357b0e59f8fe
BLAKE2b-256 checksum
How to use checksums
af1b756b5fa12ef810845d728c8ebb3e93b7e72fe339c87c28f84c1c37518961
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.10.11 {"installer":{"name":"uv","version":"0.10.11","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"macOS","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

Release history Release notifications | RSS feed

This release

0.0.3 This release

2 release files

0.0.2

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