Use this tag if you are going to refer something from Python libraries OR API Clients of Google Cloud Platform.
Questions tagged [google-cloud-python]
207 questions
2
votes
2 answers
No module named 'google.cloud._helpers' on GCE
I get an error when importing google.cloud.bigquery on GCE.
It did not happen in an environment that is not GCE.
I executed update with pip.
Do you know why?
user1@sv1:~$ python
Python 3.6.0 |Continuum Analytics, Inc.| (default, Dec 23…

michi kan
- 51
- 4
2
votes
2 answers
Google Cloud Composer using google-cloud-bigquery python client library
I'm trying to run a DAG in Google Cloud Composer in which the first component is to use a http GET request to call an API and then use the python-client library to insert the json into a BigQuery table. I am trying to run this function:…

Kenzie Tahiri
- 71
- 5
2
votes
2 answers
Create Folders inside google cloud storage bucket using python
I am trying to create a new bucket with 2 empty folders within it on Google Cloud storage using python client library.
I referred to the python client library API for GCS (https://google-cloud-python.readthedocs.io/en/latest/storage/client.html) and…

Parth Desai
- 49
- 1
- 3
2
votes
1 answer
Simple way to wait for all deamon threads to finish before exiting a Python program?
I have a long running operation that is monitored from a daemon thread and invokes a callback in the main thread once it is finished.
Python programs exit when only daemon threads are left. This is a bit unfortunate in my situation, because it means…

gmolau
- 2,815
- 1
- 22
- 45
2
votes
1 answer
How to filter by networkIP in gcloud python instances
I am using gcloud python client library (https://github.com/google/google-api-python-client) to get a list of instances. I am able to use filters like name, status but I can't figure out how to filter by IP address (networkIP). I'm sure it has…

Noel Eaton
- 23
- 4
2
votes
2 answers
Python BigQuery API - get table schema/header
Given a query example like
import uuid
from google.cloud import bigquery
def query_shakespeare():
client = bigquery.Client()
query_job = client.run_async_query(str(uuid.uuid4()), """
#standardSQL
SELECT corpus AS title,…

user1403546
- 1,680
- 4
- 22
- 43
2
votes
0 answers
Executing Template From App Engine using Java
I have to Trigger a Template of dataflow Job from App Engine in Fixed Interval of Time to Make Fix Interval I Have used cron job but do not have any Idea how to trigger a Template in Java Language I Need the Below Code in Form of Java.
import…

BackBenChers
- 304
- 2
- 15
2
votes
1 answer
Recommended method for uploading many small files to Google Cloud Storage via Python
I have a project that regularly needs to upload millions of tiny (1 - 3 KB) image files to Google Cloud Storage. What's the recommended method/library to do this? I'm currently using gsutil but wonder if there's a better library. I recently came…

Scott Davis
- 31
- 6
2
votes
1 answer
What's the proper IAM role for a service account to write custom metrics to Stackdriver in GCP
I've created a service account and furnished with private key in JSON format (/adc.json). It can be loaded into google-cloud python client via Client.from_service_account_json function fine. But when I tried call the Monitoring API to write a custom…

Devy
- 9,655
- 8
- 61
- 59
2
votes
1 answer
How can I upload a file larger than 32MB to GCS using the google-cloud client?
I recently started using google-cloud client, and I made this little example (I have omitted/changed things for clarity's sake):
2
votes
2 answers
Google Cloud and Appengine Python Package conflict
I'm going through google's appengine tutorials and made the simple example of posting a form ans retrieving the information. Through the tutorial steps I had to install Google Cloud SDK with the appengine libs.
It works fine.
One step forward I pip…

Maviles
- 3,209
- 2
- 25
- 39
2
votes
1 answer
Is there a way to save nested entities in gcloud-python?
I'm trying to save an object into Cloud Datastore, the object contains a dictionary as a property value:
client = datastore.Client(project_id)
key = client.key('Config', 'config', 'Environment', 'env_name')
env =…

Evgeny Timoshenko
- 3,119
- 5
- 33
- 53
2
votes
1 answer
gcloud preview app deploy uploads all souce code files everytime in python project taking long time
After i recently updated the gcloud components with gcloud components update to version 108.0.0, i noticed the gcloud preview app deploy app.yaml command has started taking too long every time (about 15 minutes) for my project. Before this it only…

Shark
- 257
- 2
- 13
2
votes
1 answer
Python oauth2client async
I am fighting with tornado and the official python oauth2client, gcloud... modules.
These modules accept an alternate http client passed with http=, as long as it has a method called request which can be called by any of these libraries, whenever an…

DevLounge
- 8,313
- 3
- 31
- 44
2
votes
2 answers
gcloud python: how to construct query with OR condition
It seems there is no way to construct query with OR condition. Has anyone hit this issue or know when this will be done or any workaround.
What I want to achive something like this with OR:
query = datastore.query(kind='Article',
…

Mohammad Haque
- 565
- 1
- 7
- 16