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
0
votes
1 answer

Error 403 because Google Cloud Vision client points to wrong project

I'm trying to work through the Google Cloud Vision Pyhon example but I'm getting an authentication error. This is not my only Google Cloud project, and my GOOGLE_APPLICATION_CREDENTIALS environment variable is set to the path to my bigquery project.…
AltShift
  • 336
  • 3
  • 18
0
votes
1 answer

decode protobuf file returned by google cloud storage python api

I am trying to automatically download earnings report from Google Play through Google Cloud Storage and their client api library for python, googleapiclient. I use python 3.6.5 (Anaconda distribution) on Windows 10: client_email =…
0
votes
1 answer

What is an efficient way to upload csv files from a VM to bigquery

Question Is there a more efficient way I can use to streamline a process of uploading csv files to bigquery from a python script or any other way? Description I have 1528596 CSV files which needs to be uploaded to bigquery [Tables are created…
0
votes
1 answer

how to trigger UI refresh when removing attendee with google calendar api

When removing an attendee via the patch method: https://developers.google.com/calendar/v3/reference/events/patch the attendee's calendar view in the browser does not refresh showing they're no longer invited to the meeting. How does one trigger a…
amohr
  • 455
  • 3
  • 10
0
votes
1 answer

How do I make authenticated Rest call to google machine learning predict endpoint?

I want to make a simple http rest call to a google machine learning predict endpoint, but I can't find any information on how to do that. As far as I can tell from the limited documentation, you have to use either the Java or Python library (or…
Alex Egli
  • 1,884
  • 2
  • 24
  • 43
0
votes
1 answer

List all users in a project in Google Cloud using Python API

I am trying to list all users with their access levels, in a project in Google Cloud. I am able to do so using Command Prompt command, gcloud projects get-iam-policy MY_PROJECT However, while I try doing it using API, I get {} as response body. Any…
0
votes
1 answer

Google Tag Manager - Python - Creating a custom event trigger

I am trying to automate some GTM tasks. The below code to create a "All Pages" trigger for Google Analytics works. def CreateGATrigger(service, workspace): """Create the GA Trigger. Args: service: the Tag Manager service object. …
0
votes
1 answer

Python DCM API file download location

I am using this DCM Python example scrip to download files from DCM. It is working well however it downloads the file to location of the scrip. How would I go about specifying a location on my pc for it to download to? Sorry i am a little new to…
user2407147
  • 1,508
  • 2
  • 22
  • 40
0
votes
1 answer

Manually update access_token for google oauth2 in python

I'm using google oauthlib to get an access_token and use it to get gmail atom feed using requests because it is not supported by the python lib. When using supported services such as drive, the token is automatically refreshed, how to do that in my…
Mrigank
  • 136
  • 1
  • 8
0
votes
0 answers

Can't add a parent folder to a file copied from a base presentation file - Insufficient Permission Error (Using Service Account)

I am using drive_service.files().patch() method of the google python client library to update the parent folder for a particular file. This file is a copy created with drive_service.files().copy() method, copying a base template google slide, and…
0
votes
1 answer

BigQuery google.cloud.exceptions.ServiceUnavailable 503

From time to time we getting error from google while working with BigQuery API File "../.venv/lib/python3.4/site-packages/google/cloud/bigquery/dataset.py", line 452, in exists query_params={'fields': 'id'}) File…
0
votes
2 answers

Issue Deleting Google Compute Account through API using Python

I was able to piece together a Python script to interact with the Google API Library using information from here and here. The code below is working and I'm able to list all accounts within a particular Project. See below: Code: import os from…
0
votes
1 answer

Does Google PubSub support synchronous pull for its Python API?

The documentation I have read has only covered asynchronous pull - I'd like to verify that that is the only option for the Python API.
Andrew
  • 6,295
  • 11
  • 56
  • 95
0
votes
1 answer

Call a function in a function without returning any values

I'm new to programming, and I'm hoping for your help. I need to make up a script where a function would be called in another function. At the same time, none of the functions should return anything, print() should be used to present the…
0
votes
1 answer

Using Compute module in "Google Cloud Client Library for Python"

I am looking at using google cloud python SDKs to manage my resources. I am not able to find compute module in the python SDK. Python Doc here: https://googlecloudplatform.github.io/google-cloud-python/latest/ However compute module is available in…
rahul gupta
  • 238
  • 1
  • 4
  • 11