(credentials)
return googleapiclient.discovery.build(
      'storage', 'v1', credentials=credentials, cache_discovery=False)
Get a storage client using the provided credentials or defaults.
Get a storage client using the provided credentials or defaults.
Get a storage client using the provided credentials or defaults .
def get_storage_service(credentials):
  """Get a storage client using the provided credentials or defaults."""
  # dsub is not a server application, so it is ok to filter this warning.
  warnings.filterwarnings(
      'ignore', 'Your application has authenticated using end user credentials')
  if credentials is None:
    credentials, _ = google.auth.default()
  # Set cache_discovery to False because we use google-auth
  # See https://github.com/googleapis/google-api-python-client/issues/299
  return googleapiclient.discovery.build(
      'storage', 'v1', credentials=credentials, cache_discovery=False)
def get_storage_service ( credentials ) : # dsub is not a server application, so it is ok to filter this warning. warnings . filterwarnings ( 'ignore' , 'Your application has authenticated using end user credentials' ) if credentials is None : credentials , _ = google . auth . default ( ) # Set cache_discovery to False because we use google-auth # See https://github.com/googleapis/google-api-python-client/issues/299 return googleapiclient . discovery . build ( 'storage' , 'v1' , credentials = credentials , cache_discovery = False )