#NEWLINE# @ run_if ( 'GOOGLE_APPS' ) #NEWLINE# def download_file( file_metadata ) : #NEWLINE# #INDENT# 'Download a file from a google drive folder.\n\n    Args:\n        file_metadata (dict):\n            A Google Apps API file resource.\n\n    Returns:\n        file_contents (str):\n            A buffer containing the raw binary contents of the file.\n        title (str):\n            The title of the file.\n        mimetype(str):\n            The mimetype of the file.\n    ' #NEWLINE# service = Service ( settings . GOOGLE_P12_PATH , settings . GOOGLE_SERVICE_EMAIL ) #NEWLINE# mimetype = file_metadata [ 'mimeType' ] #NEWLINE# title = file_metadata [ 'title' ] #NEWLINE# return ( service . get_file_content ( file_metadata [ 'id' ] ) , title , service )