I would like to install and use Google EarthEngine's Python API in a Google Colaboratory notebook. And I haven't gotten very far with that at all. After I type the following code into a cell,
!pip install earthengine-api
!earthengine authenticate
the earthengine-api and its dependencies install, but the authentication requires me to log into my account and to enter an authorization code (which then, presumably, stores OAuth credentials locally) and enables use of this API subsequently via ee.Initialize().
I have two issues:
- In the Colaboratory interface, which does not have a command line kind of interactivity, I am unable to enter the authorization code that EarthEngine needs to authenticate. Is there any workaround?
- Where, if at all I got around the issue above, would the OAuth credentials be stored? Would this be per-session, or per-user? And would it be accessible to this or other notebooks in subsequent sessions, or in different notebooks?