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:
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:5. Access your files
Run the following code to see the names of all the files in a Google Drive folderNote: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):
6. Post a notebook to Coop
Now that you have your notebook ready, you can post it to Coop using the Notebook object. Modify the path to your notebook file path in your Google Drive as needed:7. Update or edit a notebook at Coop
Example Colab code
