SDK Overview
The RedBrick Python SDK is a tool to interact programmatically with the RedBrick AI platform. The SDK is a developer friendly way to carry out important operations like data and label export.
The RedBrick SDK works on Mac, windows, and linux, and is available on pypi. The SDK is compatible with 3.70 <= Python < 3.10

Generate an API Key

You can create an API key for your organization under Organization Settings, which is accessible by clicking on the bottom left corner of the screen.

Install the RedBrick SDK

The redbrick-sdk is available on pypy and can be installed using pip.
$ pip3 install -U redbrick-sdk

Initialize the RedBrick SDK in Python

Starting with v0.7.0 the argument order get_project and get_org have changed
To use the SDK, you need to get your project ID, and organization ID. Fill in your own values in the following script to start off any session.
import redbrick
api_key = "<your_api_key>"
org_id = "<>"
project_id = "<>"
project = redbrick.get_project(
The project_id and org_id is available in the URL when you are logged into your project -<orgid>/projects/<projectid>.

Running inside of a Jupyter Notebook

Starting with SDK v0.7.0 this should be handled automatically for you
Under the hood, the Python SDK uses advanced language features to optimize for performance. Certain aspects of these do not play nicely with Jupyter notebooks or other complex python environments.
If you see an error similar to RuntimeError: cannot be called from a running event loop you may be able to fix this by utilizing the nest_asyncio package at the top of your notebook. This comes standard with most Jupyter notebook installs.
import nest_asyncio
Copy link
Generate an API Key
Install the RedBrick SDK
Initialize the RedBrick SDK in Python
Running inside of a Jupyter Notebook