def _get_gcp_environment_credentials(service_account_email, credentials_file, project_id):
 if (not service_account_email):
  service_account_email = _get_gcp_environ_var('GCE_EMAIL', None)
 if (not credentials_file):
  credentials_file = (_get_gcp_environ_var('GCE_CREDENTIALS_FILE_PATH', None) or _get_gcp_environ_var('GOOGLE_APPLICATION_CREDENTIALS', None) or _get_gcp_environ_var('GCE_PEM_FILE_PATH', None))
 if (not project_id):
  project_id = (_get_gcp_environ_var('GCE_PROJECT', None) or _get_gcp_environ_var('GOOGLE_CLOUD_PROJECT', None))
 return (service_account_email, credentials_file, project_id)

def _get_gcp_environment_credentials ( service_account_email , credentials_file , project_id ) : if ( not service_account_email ) : service_account_email = _get_gcp_environ_var ( 'GCE_EMAIL' , None ) if ( not credentials_file ) : credentials_file = ( _get_gcp_environ_var ( 'GCE_CREDENTIALS_FILE_PATH' , None ) or _get_gcp_environ_var ( 'GOOGLE_APPLICATION_CREDENTIALS' , None ) or _get_gcp_environ_var ( 'GCE_PEM_FILE_PATH' , None ) ) if ( not project_id ) : project_id = ( _get_gcp_environ_var ( 'GCE_PROJECT' , None ) or _get_gcp_environ_var ( 'GOOGLE_CLOUD_PROJECT' , None ) ) return ( service_account_email , credentials_file , project_id )
helper to look in environment variables for credentials .