Questions tagged [google-cloud-python]

Use this tag if you are going to refer something from Python libraries OR API Clients of Google Cloud Platform.

207 questions
4
votes
1 answer

gcloud-python close connection

Is there a way in gcloud-python to close a connection? Currently, it seems that a connection is established and once it's done, it will sit there in CLOSE_WAIT and time out eventually. Any help is appreciated. Thanks! Background: I have a server…
4
votes
2 answers

Using Google Cloud Datastore with NDB API?

There is a lot of info on using NDB API with Google App Engine Datastore but I can't find any info on how to use NDB with Google Cloud Datastore. The only module I found is googledatastore which is very primitive library. How is App Engine…
4
votes
2 answers

Using gcloud-python in GAE

I've got a bunch of little Raspberry Pis running some python code which saves directly to the Datastore (skips GAE) using the gcloud-python datastore package. This works great. I now want to present the data via web and mobile clients using Google…
4
votes
2 answers

Using Datastore outside of App Engine (python)?

I am used to Google Cloud SQL, where you can connect to a database outside of GAE. Is something like this possible for the GAE datastore, using the Python NDB interface ideally ? Basically, my use-case is I want to run acceptance tests that…
3
votes
1 answer

How to prevent GCS from automatically decompressing objects when using Python SDK?

I'm trying to download an object in GCS that is compressed, but I'm unable to download it without GCS automatically decompressing the file for me. I want to be able to download the gzip myself, and then decompress locally. If I go to my object in…
3
votes
1 answer

How to access error reason in Python google.cloud.storage upload methods?

I am using Google's google-cloud-storage Python package for GCS access. When I get a 403 error it could be for many different reasons. Google's SDK by default only provides this message: ('Request failed with status code', 403, 'Expected one of',…
3
votes
1 answer

How to fix memory leak on uploading file to Google Cloud Storage?

Memory leakage is detected via memory_profiler. Since such big file will be uploaded from 128MB GCF or f1-micro GCE, how could I prevent this memory leakage? ✗ python -m memory_profiler tests/test_gcp_storage.py 67108864 Filename:…
3
votes
2 answers

Creating bucket in Google Cloud Storage in custom location

I would like to create a bucket in GCS based in Europe using the python client. from google.cloud import storage Instantiates a client storage_client = storage.Client() The name for the new bucket bucket_name = 'my-new-bucket' Creates the new…
Mike
  • 3,775
  • 8
  • 39
  • 79
3
votes
0 answers

Speech: long_running_recognize on serverless

I would like to use long_running_recognize with on serverless. I have a constraint that I can only run for 5 minutes at a time. In order to gather a transcription which takes longer than 5 minutes, I would like to resume the operation.result call in…
3
votes
2 answers

Creating an API with just Google App Engine, webapp2 and Python?

Is it possible to create an API using just webapp2 and Python on Google App Engine? For example, let's my route /post/123 is handled by this RequestHandler: class ShowPosts(webapp2.RequestHandler): def get(self): posts =…
3
votes
0 answers

AttributeError due to Google Cloud Datastore when running python3

Ever since I installed Google Cloud's Python wrapper (using sudo pip3 install google.cloud), I've started seeing this error. Every time I run a python3 program, even if only using the interactive shell, I see the following error: Error processing…
3
votes
6 answers

google cloud python sdk installation error - SSL Certification Error

Trying to install Google Cloud SDK(Python) on Windows 10 for All Users. Getting the following error. This is new machine and start building fresh. Installed python 2.7 version prior to this. Please help me to resolve this. Output folder:…
3
votes
3 answers

Parse response from Google Cloud Vision API Python Client

I am using Python Client for Google Cloud Vision API, basically same code as in documentation http://google-cloud-python.readthedocs.io/en/latest/vision/ >>> from google.cloud import vision >>> client = vision.ImageAnnotatorClient() >>> response =…
zdenulo
  • 346
  • 3
  • 14
3
votes
1 answer

Accessing the subscription/num_oustanding_messages metric in Google PubSub from Python

Is it possible to access the subscription/num_outstanding_messages metric listed https://cloud.google.com/monitoring/api/metrics#gcp-pubsub from google-cloud-python? I've used similar code to successfully access the num_undelivered_messages metric,…
3
votes
1 answer

How can I create a PubSub subscription for a topic in a different Google Cloud Platform project using the Python API?

The API seems to allow me to create a subscription for a topic in a different project, but when I inspect the newly created subscription, the it is associated with the project where the topic is located. from google.cloud import…
Jan Dolejsi
  • 1,389
  • 13
  • 25
1 2
3
13 14