{"id":18721,"date":"2017-09-22T12:15:28","date_gmt":"2017-09-22T09:15:28","guid":{"rendered":"http:\/\/www.webcodegeeks.com\/?p=18721"},"modified":"2017-09-19T12:00:55","modified_gmt":"2017-09-19T09:00:55","slug":"create-google-drive-app-flask","status":"publish","type":"post","link":"https:\/\/www.webcodegeeks.com\/python\/create-google-drive-app-flask\/","title":{"rendered":"How to create a Google Drive App in Flask"},"content":{"rendered":"<p>This is the first in a series of articles for web programmers that explain in detail about using the Google Drive API in your web applications to access files\/folders on behalf of the users of your application. In my last project, I had to develop a python flask app for my users that required to access the files stored in their google drive account.<span id=\"more-206\"><\/span><\/p>\n<p>The major challenge for me was to authenticate to google and access the drive on the user\u2019s behalf once they grant permission to my app. This method of authentication is called\u00a0<a href=\"https:\/\/en.wikipedia.org\/wiki\/OAuth\">OAuth<\/a>\u00a0and is very much needed for implementing the drive api.<\/p>\n<p>However, a good documentation to implement this in a backend app, especially a python web-based app is very much lacking. The so called\u00a0<a href=\"https:\/\/developers.google.com\/drive\/v3\/web\/quickstart\/python\">quickstart for drive api<\/a>\u00a0shows some example code, but what I needed was a step-by-step tutorial of how to go about doing it. Since I couldn\u2019t find any such tutorial online, I thought about writing one myself.<\/p>\n<h3 id=\"i-register-a-google-app-by-visiting-the-google-api-console\">I: Register a google app by visiting the\u00a0<a href=\"https:\/\/console.developers.google.com\/\">Google API console<\/a>:<\/h3>\n<p>The way the latest version (V3) of drive API works is only through OAuth. It means you cannot put a password or API key inside your code and access the drive files. You need to register your backend app and generate OAuth credentials for the app, so that it can access the drive on the user\u2019s behalf once the user grants permission to the app. So the first step is going to the\u00a0<a href=\"https:\/\/console.developers.google.com\/\">Google API console<\/a>, registering the app itself and generating OAuth credentials. The registration process is pretty straightforward, you just select \u201cCreate Project\u201d from the dropdown and give a nice name for your project such as\u00a0<code class=\"highlighter-rouge\">Flask Drive Example App<\/code>\u00a0in our case.<\/p>\n<p><a href=\"http:\/\/www.webcodegeeks.com\/wp-content\/uploads\/2017\/09\/drive_api_steps.png\"><img decoding=\"async\" class=\"aligncenter size-full wp-image-18717\" src=\"http:\/\/www.webcodegeeks.com\/wp-content\/uploads\/2017\/09\/drive_api_steps.png\" alt=\"\" width=\"800\" height=\"1207\" srcset=\"https:\/\/www.webcodegeeks.com\/wp-content\/uploads\/2017\/09\/drive_api_steps.png 800w, https:\/\/www.webcodegeeks.com\/wp-content\/uploads\/2017\/09\/drive_api_steps-199x300.png 199w, https:\/\/www.webcodegeeks.com\/wp-content\/uploads\/2017\/09\/drive_api_steps-768x1159.png 768w, https:\/\/www.webcodegeeks.com\/wp-content\/uploads\/2017\/09\/drive_api_steps-679x1024.png 679w\" sizes=\"(max-width: 800px) 100vw, 800px\" \/><\/a><\/p>\n<h3 id=\"ii-configure-the-credentials-and-download-the-client_idjson-file\">II: Configure the credentials and download the client_id.json file:<\/h3>\n<p>This is the credential file that validates to Google who you are (as a developer) and also your app that acts on your behalf. Download and save it as\u00a0<code class=\"highlighter-rouge\">client_id.json<\/code>\u00a0in the same directory as the flask app.<\/p>\n<p><a href=\"http:\/\/www.webcodegeeks.com\/wp-content\/uploads\/2017\/09\/configuration_steps.png\"><img decoding=\"async\" class=\"aligncenter size-full wp-image-18722\" src=\"http:\/\/www.webcodegeeks.com\/wp-content\/uploads\/2017\/09\/configuration_steps.png\" alt=\"\" width=\"762\" height=\"406\" srcset=\"https:\/\/www.webcodegeeks.com\/wp-content\/uploads\/2017\/09\/configuration_steps.png 762w, https:\/\/www.webcodegeeks.com\/wp-content\/uploads\/2017\/09\/configuration_steps-300x160.png 300w, https:\/\/www.webcodegeeks.com\/wp-content\/uploads\/2017\/09\/configuration_steps-620x330.png 620w\" sizes=\"(max-width: 762px) 100vw, 762px\" \/><\/a><\/p>\n<h3 id=\"iii-write-your-back-end-app\">III: Write your back-end app:<\/h3>\n<p>The most important thing to know before building your app is to install these dependencies:<\/p>\n<pre class=\"brush:py\">pip install flask google-api-python-client<\/pre>\n<p>You can replace flask with django, pylons or any other framework you use, but this tutorial and code example is based on flask. The principle of accessing the drive api should still apply, so you should be able to make use of this code.<\/p>\n<p>The first thing to do is create a flask object and handle the home page url. It could in fact be any other url in your app, but in this example, I\u2019ve used the home page url (\/) to do the OAuth authentication on behalf of the logged in user.<\/p>\n<pre class=\"brush:py; wrap-lines:false\">app = flask.Flask(__name__)\r\n\r\n@app.route('\/')\r\ndef index():\r\n\tcredentials = get_credentials()\r\n\tif credentials == False:\r\n\t\treturn flask.redirect(flask.url_for('oauth2callback'))\r\n\telif credentials.access_token_expired:\r\n\t\treturn flask.redirect(flask.url_for('oauth2callback'))\r\n\telse:\r\n\t\tprint('now calling fetch')\r\n\t\tall_files = fetch(\"'root' in parents and mimeType = 'application\/vnd.google-apps.folder'\", sort='modifiedTime desc')\r\n\t\ts = \"\"\r\n\t\tfor file in all_files:\r\n\t\t\ts += \"%s, %s&lt;br&gt;\" % (file['name'],file['id'])\r\n\t\treturn s<\/pre>\n<p>We first check whether we have the drive access credentials for the user locally stored in a file. This is done by the\u00a0<code class=\"highlighter-rouge\">get_credentials()<\/code>\u00a0function that checks the local access token file credentials.json (not to be confused with client_id.json we downloaded earlier which is for developer credentials). Again, we are assuming a single user scenario here. If your drive app needs to authenticate with multiple users, you\u2019ll have to store separate credentials.json for each logged-in user in the database, and access that through a session or something.<\/p>\n<p>Further, if credentials aren\u2019t found locally or have expired, we direct them to\u00a0<code class=\"highlighter-rouge\">\/oauth2callback<\/code>, so google will authenticate them and send us the token for accessing the drive, post which, we will put that token into the local file, credentials.json and redirect the user back to this index site. Finally, if the credentials are valid, we call the\u00a0<code class=\"highlighter-rouge\">fetch()<\/code>\u00a0function that displays the list of all root folders in that user\u2019s drive along with their IDs. Here is the code for\u00a0<code class=\"highlighter-rouge\">oauth2callback<\/code>:<\/p>\n<pre class=\"brush:py; wrap-lines:false\">@app.route('\/oauth2callback')\r\ndef oauth2callback():\r\n\tflow = client.flow_from_clientsecrets('client_id.json',\r\n\t\t\tscope='https:\/\/www.googleapis.com\/auth\/drive',\r\n\t\t\tredirect_uri=flask.url_for('oauth2callback', _external=True)) # access drive api using developer credentials\r\n\tflow.params['include_granted_scopes'] = 'true'\r\n\tif 'code' not in flask.request.args:\r\n\t\tauth_uri = flow.step1_get_authorize_url()\r\n\t\treturn flask.redirect(auth_uri)\r\n\telse:\r\n\t\tauth_code = flask.request.args.get('code')\r\n\t\tcredentials = flow.step2_exchange(auth_code)\r\n\t\topen('credentials.json','w').write(credentials.to_json()) # write access token to credentials.json locally\r\n\t\treturn flask.redirect(flask.url_for('index'))<\/pre>\n<p>Once you have the credentials locally (in the form of\u00a0<code class=\"highlighter-rouge\">credentials.json<\/code>), you can just use it to access the drive API. Thus, the result of this whole exercise is that only on first page load is the user redirected to google site to authenticate themselves. Once the app has the access token (credentials.json), its no longer required, the result is displayed directly on the page from then on. If all goes well, you should be able to see a screen such as this when you test this example app for the first time:<\/p>\n<p><a href=\"http:\/\/www.webcodegeeks.com\/wp-content\/uploads\/2017\/09\/oauth_screen.png\"><img decoding=\"async\" class=\"aligncenter size-full wp-image-18723\" src=\"http:\/\/www.webcodegeeks.com\/wp-content\/uploads\/2017\/09\/oauth_screen.png\" alt=\"\" width=\"526\" height=\"323\" srcset=\"https:\/\/www.webcodegeeks.com\/wp-content\/uploads\/2017\/09\/oauth_screen.png 526w, https:\/\/www.webcodegeeks.com\/wp-content\/uploads\/2017\/09\/oauth_screen-300x184.png 300w\" sizes=\"(max-width: 526px) 100vw, 526px\" \/><\/a><\/p>\n<p>I\u2019ve also included the functions to download and upload files to the drive as they will be very useful:<\/p>\n<pre class=\"brush:py\">def download_file(file_id, output_file):\r\n\tcredentials = get_credentials()\r\n\thttp = credentials.authorize(httplib2.Http())\r\n\tservice = discovery.build('drive', 'v3', http=http)\r\n\t#file_id = '0BwwA4oUTeiV1UVNwOHItT0xfa2M'\r\n\trequest = service.files().export_media(fileId=file_id,mimeType='application\/vnd.openxmlformats-officedocument.spreadsheetml.sheet')\r\n\t#request = service.files().get_media(fileId=file_id)\r\n\t\r\n\tfh = open(output_file,'wb') #io.BytesIO()\r\n\tdownloader = MediaIoBaseDownload(fh, request)\r\n\tdone = False\r\n\twhile done is False:\r\n\t\tstatus, done = downloader.next_chunk()\r\n\t\t#print (\"Download %d%%.\" % int(status.progress() * 100))\r\n\tfh.close()\r\n\t#return fh\r\n\t\r\ndef update_file(file_id, local_file):\r\n\tcredentials = get_credentials()\r\n\thttp = credentials.authorize(httplib2.Http())\r\n\tservice = discovery.build('drive', 'v3', http=http)\r\n\t# First retrieve the file from the API.\r\n\tfile = service.files().get(fileId=file_id).execute()\r\n\t# File's new content.\r\n\tmedia_body = MediaFileUpload(local_file, resumable=True)\r\n\t# Send the request to the API.\r\n\tupdated_file = service.files().update(\r\n\t\tfileId=file_id,\r\n\t\t#body=file,\r\n\t\t#newRevision=True,\r\n\t\tmedia_body=media_body).execute()<\/pre>\n<p>I\u2019ll leave the more comprehensive use of these functions as an exercise to the reader who wants to develop a more fully featured app out of this. Click the below link to download the\u00a0<code class=\"highlighter-rouge\">flask_drive_example.py<\/code>\u00a0script for this example implementation from the Github gist:<\/p>\n<p><a class=\"btn btn-md btn-success\" href=\"https:\/\/gist.githubusercontent.com\/prahladyeri\/0b92b9ca837a0f5474c732876220db78\">\u00a0flask_drive_example.py<\/a><\/p>\n<div class=\"attribution\">\n<table>\n<tbody>\n<tr>\n<td><span class=\"reference\">Reference: <\/span><\/td>\n<td><a href=\"https:\/\/www.prahladyeri.com\/blog\/2016\/12\/how-to-create-google-drive-app-python-flask.html\">How to create a Google Drive App in Flask<\/a> from our <a href=\"http:\/\/www.javacodegeeks.com\/jcg\">WCG partner<\/a> Prahlad Yeri at the <a href=\"http:\/\/www.prahladyeri.com\/\">Prahlad Yeri<\/a> blog.<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<\/div>\n","protected":false},"excerpt":{"rendered":"<p>This is the first in a series of articles for web programmers that explain in detail about using the Google Drive API in your web applications to access files\/folders on behalf of the users of your application. In my last project, I had to develop a python flask app for my users that required to &hellip;<\/p>\n","protected":false},"author":20,"featured_media":1651,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[53],"tags":[],"class_list":["post-18721","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-python"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v26.5 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>How to create a Google Drive App in Flask - Web Code Geeks - 2026<\/title>\n<meta name=\"description\" content=\"This is the first in a series of articles for web programmers that explain in detail about using the Google Drive API in your web applications to access\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.webcodegeeks.com\/python\/create-google-drive-app-flask\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"How to create a Google Drive App in Flask - Web Code Geeks - 2026\" \/>\n<meta property=\"og:description\" content=\"This is the first in a series of articles for web programmers that explain in detail about using the Google Drive API in your web applications to access\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.webcodegeeks.com\/python\/create-google-drive-app-flask\/\" \/>\n<meta property=\"og:site_name\" content=\"Web Code Geeks\" \/>\n<meta property=\"article:publisher\" content=\"https:\/\/www.facebook.com\/webcodegeeks\" \/>\n<meta property=\"article:author\" content=\"https:\/\/www.facebook.com\/prahlad1981\" \/>\n<meta property=\"article:published_time\" content=\"2017-09-22T09:15:28+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/www.webcodegeeks.com\/wp-content\/uploads\/2014\/11\/python-logo.jpg\" \/>\n\t<meta property=\"og:image:width\" content=\"150\" \/>\n\t<meta property=\"og:image:height\" content=\"150\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/jpeg\" \/>\n<meta name=\"author\" content=\"Prahlad Yeri\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:creator\" content=\"@https:\/\/twitter.com\/prahladyeri\" \/>\n<meta name=\"twitter:site\" content=\"@webcodegeeks\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Prahlad Yeri\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"6 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\/\/www.webcodegeeks.com\/python\/create-google-drive-app-flask\/#article\",\"isPartOf\":{\"@id\":\"https:\/\/www.webcodegeeks.com\/python\/create-google-drive-app-flask\/\"},\"author\":{\"name\":\"Prahlad Yeri\",\"@id\":\"https:\/\/www.webcodegeeks.com\/#\/schema\/person\/adbf41ec03855cdb1730dd42f2725bfd\"},\"headline\":\"How to create a Google Drive App in Flask\",\"datePublished\":\"2017-09-22T09:15:28+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\/\/www.webcodegeeks.com\/python\/create-google-drive-app-flask\/\"},\"wordCount\":818,\"commentCount\":1,\"publisher\":{\"@id\":\"https:\/\/www.webcodegeeks.com\/#organization\"},\"image\":{\"@id\":\"https:\/\/www.webcodegeeks.com\/python\/create-google-drive-app-flask\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/www.webcodegeeks.com\/wp-content\/uploads\/2014\/11\/python-logo.jpg\",\"articleSection\":[\"Python\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\/\/www.webcodegeeks.com\/python\/create-google-drive-app-flask\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\/\/www.webcodegeeks.com\/python\/create-google-drive-app-flask\/\",\"url\":\"https:\/\/www.webcodegeeks.com\/python\/create-google-drive-app-flask\/\",\"name\":\"How to create a Google Drive App in Flask - Web Code Geeks - 2026\",\"isPartOf\":{\"@id\":\"https:\/\/www.webcodegeeks.com\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\/\/www.webcodegeeks.com\/python\/create-google-drive-app-flask\/#primaryimage\"},\"image\":{\"@id\":\"https:\/\/www.webcodegeeks.com\/python\/create-google-drive-app-flask\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/www.webcodegeeks.com\/wp-content\/uploads\/2014\/11\/python-logo.jpg\",\"datePublished\":\"2017-09-22T09:15:28+00:00\",\"description\":\"This is the first in a series of articles for web programmers that explain in detail about using the Google Drive API in your web applications to access\",\"breadcrumb\":{\"@id\":\"https:\/\/www.webcodegeeks.com\/python\/create-google-drive-app-flask\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/www.webcodegeeks.com\/python\/create-google-drive-app-flask\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/www.webcodegeeks.com\/python\/create-google-drive-app-flask\/#primaryimage\",\"url\":\"https:\/\/www.webcodegeeks.com\/wp-content\/uploads\/2014\/11\/python-logo.jpg\",\"contentUrl\":\"https:\/\/www.webcodegeeks.com\/wp-content\/uploads\/2014\/11\/python-logo.jpg\",\"width\":150,\"height\":150},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/www.webcodegeeks.com\/python\/create-google-drive-app-flask\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/www.webcodegeeks.com\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Python\",\"item\":\"https:\/\/www.webcodegeeks.com\/category\/python\/\"},{\"@type\":\"ListItem\",\"position\":3,\"name\":\"How to create a Google Drive App in Flask\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/www.webcodegeeks.com\/#website\",\"url\":\"https:\/\/www.webcodegeeks.com\/\",\"name\":\"Web Code Geeks\",\"description\":\"Web Developers Resource Center\",\"publisher\":{\"@id\":\"https:\/\/www.webcodegeeks.com\/#organization\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/www.webcodegeeks.com\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Organization\",\"@id\":\"https:\/\/www.webcodegeeks.com\/#organization\",\"name\":\"Exelixis Media P.C.\",\"url\":\"https:\/\/www.webcodegeeks.com\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/www.webcodegeeks.com\/#\/schema\/logo\/image\/\",\"url\":\"https:\/\/www.webcodegeeks.com\/wp-content\/uploads\/2022\/06\/exelixis-logo.png\",\"contentUrl\":\"https:\/\/www.webcodegeeks.com\/wp-content\/uploads\/2022\/06\/exelixis-logo.png\",\"width\":864,\"height\":246,\"caption\":\"Exelixis Media P.C.\"},\"image\":{\"@id\":\"https:\/\/www.webcodegeeks.com\/#\/schema\/logo\/image\/\"},\"sameAs\":[\"https:\/\/www.facebook.com\/webcodegeeks\",\"https:\/\/x.com\/webcodegeeks\"]},{\"@type\":\"Person\",\"@id\":\"https:\/\/www.webcodegeeks.com\/#\/schema\/person\/adbf41ec03855cdb1730dd42f2725bfd\",\"name\":\"Prahlad Yeri\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/www.webcodegeeks.com\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/secure.gravatar.com\/avatar\/70a8e7bba939c7539943aa1191374d2504d95a2a95acb04a1e44adc3b4c72fe3?s=96&d=mm&r=g\",\"contentUrl\":\"https:\/\/secure.gravatar.com\/avatar\/70a8e7bba939c7539943aa1191374d2504d95a2a95acb04a1e44adc3b4c72fe3?s=96&d=mm&r=g\",\"caption\":\"Prahlad Yeri\"},\"description\":\"Prahlad is a freelance software developer working on web and mobile application development. He also likes to blog about programming and contribute to opensource.\",\"sameAs\":[\"http:\/\/www.prahladyeri.com\/\",\"https:\/\/www.facebook.com\/prahlad1981\",\"http:\/\/in.linkedin.com\/pub\/prahlad-yeri\/16\/a53\/243\/\",\"https:\/\/x.com\/https:\/\/twitter.com\/prahladyeri\"],\"url\":\"https:\/\/www.webcodegeeks.com\/author\/prahlad-yeri\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"How to create a Google Drive App in Flask - Web Code Geeks - 2026","description":"This is the first in a series of articles for web programmers that explain in detail about using the Google Drive API in your web applications to access","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/www.webcodegeeks.com\/python\/create-google-drive-app-flask\/","og_locale":"en_US","og_type":"article","og_title":"How to create a Google Drive App in Flask - Web Code Geeks - 2026","og_description":"This is the first in a series of articles for web programmers that explain in detail about using the Google Drive API in your web applications to access","og_url":"https:\/\/www.webcodegeeks.com\/python\/create-google-drive-app-flask\/","og_site_name":"Web Code Geeks","article_publisher":"https:\/\/www.facebook.com\/webcodegeeks","article_author":"https:\/\/www.facebook.com\/prahlad1981","article_published_time":"2017-09-22T09:15:28+00:00","og_image":[{"width":150,"height":150,"url":"https:\/\/www.webcodegeeks.com\/wp-content\/uploads\/2014\/11\/python-logo.jpg","type":"image\/jpeg"}],"author":"Prahlad Yeri","twitter_card":"summary_large_image","twitter_creator":"@https:\/\/twitter.com\/prahladyeri","twitter_site":"@webcodegeeks","twitter_misc":{"Written by":"Prahlad Yeri","Est. reading time":"6 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/www.webcodegeeks.com\/python\/create-google-drive-app-flask\/#article","isPartOf":{"@id":"https:\/\/www.webcodegeeks.com\/python\/create-google-drive-app-flask\/"},"author":{"name":"Prahlad Yeri","@id":"https:\/\/www.webcodegeeks.com\/#\/schema\/person\/adbf41ec03855cdb1730dd42f2725bfd"},"headline":"How to create a Google Drive App in Flask","datePublished":"2017-09-22T09:15:28+00:00","mainEntityOfPage":{"@id":"https:\/\/www.webcodegeeks.com\/python\/create-google-drive-app-flask\/"},"wordCount":818,"commentCount":1,"publisher":{"@id":"https:\/\/www.webcodegeeks.com\/#organization"},"image":{"@id":"https:\/\/www.webcodegeeks.com\/python\/create-google-drive-app-flask\/#primaryimage"},"thumbnailUrl":"https:\/\/www.webcodegeeks.com\/wp-content\/uploads\/2014\/11\/python-logo.jpg","articleSection":["Python"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/www.webcodegeeks.com\/python\/create-google-drive-app-flask\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/www.webcodegeeks.com\/python\/create-google-drive-app-flask\/","url":"https:\/\/www.webcodegeeks.com\/python\/create-google-drive-app-flask\/","name":"How to create a Google Drive App in Flask - Web Code Geeks - 2026","isPartOf":{"@id":"https:\/\/www.webcodegeeks.com\/#website"},"primaryImageOfPage":{"@id":"https:\/\/www.webcodegeeks.com\/python\/create-google-drive-app-flask\/#primaryimage"},"image":{"@id":"https:\/\/www.webcodegeeks.com\/python\/create-google-drive-app-flask\/#primaryimage"},"thumbnailUrl":"https:\/\/www.webcodegeeks.com\/wp-content\/uploads\/2014\/11\/python-logo.jpg","datePublished":"2017-09-22T09:15:28+00:00","description":"This is the first in a series of articles for web programmers that explain in detail about using the Google Drive API in your web applications to access","breadcrumb":{"@id":"https:\/\/www.webcodegeeks.com\/python\/create-google-drive-app-flask\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.webcodegeeks.com\/python\/create-google-drive-app-flask\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.webcodegeeks.com\/python\/create-google-drive-app-flask\/#primaryimage","url":"https:\/\/www.webcodegeeks.com\/wp-content\/uploads\/2014\/11\/python-logo.jpg","contentUrl":"https:\/\/www.webcodegeeks.com\/wp-content\/uploads\/2014\/11\/python-logo.jpg","width":150,"height":150},{"@type":"BreadcrumbList","@id":"https:\/\/www.webcodegeeks.com\/python\/create-google-drive-app-flask\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/www.webcodegeeks.com\/"},{"@type":"ListItem","position":2,"name":"Python","item":"https:\/\/www.webcodegeeks.com\/category\/python\/"},{"@type":"ListItem","position":3,"name":"How to create a Google Drive App in Flask"}]},{"@type":"WebSite","@id":"https:\/\/www.webcodegeeks.com\/#website","url":"https:\/\/www.webcodegeeks.com\/","name":"Web Code Geeks","description":"Web Developers Resource Center","publisher":{"@id":"https:\/\/www.webcodegeeks.com\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.webcodegeeks.com\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Organization","@id":"https:\/\/www.webcodegeeks.com\/#organization","name":"Exelixis Media P.C.","url":"https:\/\/www.webcodegeeks.com\/","logo":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.webcodegeeks.com\/#\/schema\/logo\/image\/","url":"https:\/\/www.webcodegeeks.com\/wp-content\/uploads\/2022\/06\/exelixis-logo.png","contentUrl":"https:\/\/www.webcodegeeks.com\/wp-content\/uploads\/2022\/06\/exelixis-logo.png","width":864,"height":246,"caption":"Exelixis Media P.C."},"image":{"@id":"https:\/\/www.webcodegeeks.com\/#\/schema\/logo\/image\/"},"sameAs":["https:\/\/www.facebook.com\/webcodegeeks","https:\/\/x.com\/webcodegeeks"]},{"@type":"Person","@id":"https:\/\/www.webcodegeeks.com\/#\/schema\/person\/adbf41ec03855cdb1730dd42f2725bfd","name":"Prahlad Yeri","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.webcodegeeks.com\/#\/schema\/person\/image\/","url":"https:\/\/secure.gravatar.com\/avatar\/70a8e7bba939c7539943aa1191374d2504d95a2a95acb04a1e44adc3b4c72fe3?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/70a8e7bba939c7539943aa1191374d2504d95a2a95acb04a1e44adc3b4c72fe3?s=96&d=mm&r=g","caption":"Prahlad Yeri"},"description":"Prahlad is a freelance software developer working on web and mobile application development. He also likes to blog about programming and contribute to opensource.","sameAs":["http:\/\/www.prahladyeri.com\/","https:\/\/www.facebook.com\/prahlad1981","http:\/\/in.linkedin.com\/pub\/prahlad-yeri\/16\/a53\/243\/","https:\/\/x.com\/https:\/\/twitter.com\/prahladyeri"],"url":"https:\/\/www.webcodegeeks.com\/author\/prahlad-yeri\/"}]}},"_links":{"self":[{"href":"https:\/\/www.webcodegeeks.com\/wp-json\/wp\/v2\/posts\/18721","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.webcodegeeks.com\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.webcodegeeks.com\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.webcodegeeks.com\/wp-json\/wp\/v2\/users\/20"}],"replies":[{"embeddable":true,"href":"https:\/\/www.webcodegeeks.com\/wp-json\/wp\/v2\/comments?post=18721"}],"version-history":[{"count":0,"href":"https:\/\/www.webcodegeeks.com\/wp-json\/wp\/v2\/posts\/18721\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.webcodegeeks.com\/wp-json\/wp\/v2\/media\/1651"}],"wp:attachment":[{"href":"https:\/\/www.webcodegeeks.com\/wp-json\/wp\/v2\/media?parent=18721"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.webcodegeeks.com\/wp-json\/wp\/v2\/categories?post=18721"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.webcodegeeks.com\/wp-json\/wp\/v2\/tags?post=18721"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}