erbro.blogg.se

Install python pip ubuntu
Install python pip ubuntu













install python pip ubuntu

from_client_secrets_file ( 'credentials.json', SCOPES ) creds = flow. refresh ( Request ()) else : print ( 'First run through so putting up login dialog' ) # credentials.json downloaded from įlow = InstalledAppFlow. refresh_token : print ( 'Requesting new token' ) creds. from_authorized_user_file ( token_file, SCOPES ) # If there are no (valid) credentials available, let the user log in.

install python pip ubuntu install python pip ubuntu

exists ( token_file ): creds = Credentials. # created automatically when the authorization flow completes for the first SCOPES = def main (): token_file = 'secrets/token-generated.json' creds = None # The file token.json stores the user's access and refresh tokens, and is # If modifying these scopes, delete the file in secrets/token xxx.json. # and it will refresh the token accordingly # Can run this code to verify the token is the correct user # If creating for first time download the json `credentials.json` from OAuth 2.0 Client IDs From _future_ import print_function import os.path from import Request from import Credentials from google_auth_oauthlib.flow import InstalledAppFlow from googleapiclient.discovery import build from googleapiclient.errors import HttpError # from googleapiclient.http import MediaFileUpload















Install python pip ubuntu