Skip to main content
To access these methods in Colab, please first complete the following steps to set up EDSL and connect your Google Drive:

1. Store your API key as a secret

In Google Colab, your API keys can be stored as “secrets” in lieu of storing them in a .env file as you would in other notebook types. For example, you can store your Expected Parrot API key as follows:
Storing API key in Google Colab

2. Install EDSL

Run the following command in a code cell to install the EDSL package:

3. Access your API key

Run the following code to access your API key in your Colab notebook:

4. Connect your Google Drive

To access your files in Google Drive, you need to connect your Google Drive to Colab. Run the following code to do this, and accept the permissions request in the pop-up window:
You will see the following message returned:

5. Access your files

Run the following code to see the names of all the files in a Google Drive folder
Note:Note that you will need to replace the path with the path to your own folder, and you may need to adjust the path to match the structure of your Google Drive (e.g., here the default Google Drive folder name “Colab Notebooks” has been changed to “ColabNotebooks” for convenience in specifying the path):
Sample output:

6. Post a notebook to Expected Parrot

Now that you have your notebook ready, you can post it to Expected Parrot using the Notebook object. Modify the path to your notebook file path in your Google Drive as needed:
Example output:

7. Update or edit a notebook at Expected Parrot

Output:

Example Colab code

Posting a Colab notebook to Expected Parrot