Skip to main content

Google Colab

Google Colab Logo

Google Colab is a free, hosted Notebook service.

You can easily configure Google Colab to work with Arraylake.

Configure Access to Arraylake

Using an API Key

You can use a service Account API Tokens to authenticate with Arraylake.

Once you have an Arraylake API token set up, store it in the Colab Secrets Manager. You can call it whatever you like. In this example, I will use ARRAYLAKE_TOKEN.

You should also set up credential to talk to your object store. If you're using AWS S3, that means setting both AWS_ACCESS_KEY_ID and AWS_SECRET_ACCESS_KEY.

When you're finished setting these secrets, your secrets tab should look like this:

Colab Secrets

Interactive User Account Login

You can log in to Arraylake using Python by calling

client.login()

Use Arraylake from a Notebook

Install Arraylake

You'll need to pip install Arraylake in your notebook.

! pip install arraylake

Initialize Client

You'll want to configure Arraylake as follows:

from arraylake import Client, config

# API key login
from google.colab import userdata
client = Client(token=userdata.get('ARRAYLAKE_TOKEN'))

# or interactive login
client = Client()
client.login()

From here, you can interact with Arraylake to read and write data! 🎉