geetools.Initialize#

Tools for the ee.Initialize function.

Classes#

InitializeAccessor

Toolbox for the ee.Initialize function.

Package Contents#

class geetools.Initialize.InitializeAccessor(obj)[source]#

Toolbox for the ee.Initialize function.

Initialize the class.

Parameters:

obj (Callable)

static from_user(name='', credential_pathname='')[source]#

Initialize Earthengine API using a specific user.

Equivalent to the ee.initialize function but with a specific credential file stored in the machine by the ee.Authenticate.to_user function.

Parameters:
  • name (str) – The name of the user as saved when created. use default if not set

  • credential_pathname (str) – The path to the folder where the credentials are stored. If not set, it uses the default path

Return type:

None

Example

import ee
import geetools

ee.Initialize.from_user("test")

# check that GEE is connected
ee.Number(1).getInfo()