Questions tagged [google-python-api]

The Google API Client Library for Python is designed for Python client-application developers. It offers simple, flexible access to many Google APIs. https://developers.google.com/api-client-library/python/

please use [Google-api-python-client] tag

91 questions
2
votes
0 answers

google-api-python-client httplib2 timeout

I have a machine for test, fowlloing code will be fine, but when I deploye to production server, It will show timeout. error: socket.timeout : timeout this server have firewall, but already allowed google ip. is this socket will do like grip, or…
Frank Liao
  • 855
  • 1
  • 8
  • 25
2
votes
3 answers

GCP BigQuery how to set expiration date to table by python api

I am using BigQuery Python API to create table, and would like to set an expiration date to the table, so the table would be automatically dropped after certain days. Here is my code: client = bq.Client() job_config = bq.QueryJobConfig() dataset_id…
2
votes
2 answers

Export bigQuery table to google data storage runs into AttributeError exception

I am trying to export table from google bigQuery to google data storage as json file. Running this python snippet from google.cloud import bigquery client = bigquery.Client() bucket_name = 'mybucket' destination_uri =…
2
votes
1 answer

Is it possible to query Google Cloud Storage similar to using `ls` command in terminal?

I am using the python library for querying Google Cloud Storage, and I am organizing information in Storage using a naming hierarchy. For…
2
votes
1 answer

Get mail from gmail using service account

I'm using google service account for access all mail from gmail account without UI interface but When I execute my code it giving me error googleapiclient.errors.HttpError: https://www.googleapis.com/gmail/v1/users/me/labels?alt=json returned …
2
votes
0 answers

Google DFP: How to get delivery report for multiple orders

I have integrated Google's DFP API(python) to get data from the DFP Network using a service account. The following is my report job. values = [{ 'key': 'id', 'value': { 'xsi_type': 'NumberValue', 'value': order_id # order_id…
aprasanth
  • 1,079
  • 7
  • 20
2
votes
1 answer

Incomplete Google Drive REST API results for Team Drive files

Problem During the first phase of my Team Drive backup system, I first need to scan files in the given Team Drive in order to determine which files to copy for backup. I (think?) have full permissions over the files & folders of the Team Drive,…
TDk
  • 1,019
  • 6
  • 18
2
votes
2 answers

How to export specific sheet using new (v3) google drive API

I am trying to download specific sheet from a spread-sheet (on Google Drive) but unable to find a method to do so. I am using Python Client API library (v3) and passing file_id and mimeType in export_media() function as shown below: request =…
1
vote
1 answer

Google Cloud Machine Learning Engine v1 API is not working with filter jobId:rnn*

I started using the Machine Learning Engine API for terminal and python and I discovered some discrepancies between the bash API and python API: $ gcloud ml-engine jobs list --filter='jobId:eval_*' JOB_ID STATUS …
1
vote
2 answers

How can i know that my Youtube API Data is correct?

I having some trouble to understand something related to the API of youtube So my code is basically very simple: name = input("enter the username: ") key = "MY API KEY" data =…
1
vote
0 answers

Delete account links from service account

We have a service account that has access to data of our different clients' analytics accounts. Apparently there's an undocumented limit of 200 accounts that a specific user (in our case, the service account) can be linked to. This appears when…
1
vote
1 answer

How to loag external BigQuery table from Google Cloud Storage using python?

I'm using load_table_from_uri() method of bigquery.Client(), in the following code (derived from this tutorial), and it creates native table: from google.cloud import bigquery def main(): ''' Load all tables ''' client = bigquery.Client() …
Bunyk
  • 7,635
  • 8
  • 47
  • 79
1
vote
1 answer

Chronic timeout issue with Google's API via python?

I am working on a little web app to help me manage my gmail. I have set it up through Google's API with the following function using the OAuth token I received through django-allauth. import google.oauth2.credentials from .choices import GMAIL from…
1
vote
0 answers

numRenderBlockingRoundTrips parameter in googlepagespeed api

I am using googlepagespeedapi, now there are two parameters in pagestat that i do not understand . These are 'numTotalRoundTrips': 10, 'numRenderBlockingRoundTrips': 0 Does roundtrips mean the redirections ? Please help.
1
vote
1 answer

How to programmatically generate kubernetes config from GCP service account using python API

I already found the way using gcloud CLI. gcloud auth activate-service-account --key-file=serviceaccount.json gcloud container clusters get-credentials $clusterName \ --zone=$zone --project=$project kubectl config view --minify…