code: def connect(service_account, credentials_file_path, api_version='v2'):
      
  
      # Create an httplib2.Http object to handle our HTTP requests an
      # authorize it with the Credentials. Note that the first parameter,
      # service_account_name, is the Email address created for the Service
      # account. It must be the email address associated with the key that
      # was created.
      scope = 'https://www.googleapis.com/auth/androidpublisher'
      credentials = ServiceAccountCredentials.from_p12_keyfile(service_account, credentials_file_path, scopes=scope)
      http = httplib2.Http()
      http = credentials.authorize(http)
  
      service = build('androidpublisher', api_version, http=http, cache_discovery=False)
  
      return service
docs: Connect to the google play interface