def create_connection_from_config():
    """ Returns Google API client for Compute. It detects credentials for Service accounts and User accounts.
    """
    credentials = ServiceAccountCredentials.get_application_default()
    return googleapiclient.discovery.build(
        'compute', 'v1', credentials=credentials,cache_discovery=False)
 Returns Google API client for Compute. It detects credentials for Service accounts and User accounts.
    
powerfulseal/clouddrivers/gcp_driver.py