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
1
vote
1 answer
datalab gcp package vs gcloud
I have been working with python (interacting with BigQuery and Cloud Storage) for several months and more recently have been using Datalab for similar tasks. I'd appreciate clarification on the difference between the gcloud (aka gcloud-python)…

SheRey
- 305
- 1
- 5
- 15
1
vote
1 answer
Datastore best way to store aggregated nested data for better querying
I am a newbie to datastore. using it for an non GAE application.
I am approaching for a better design to my use case.
Storing below nested aggregated data by flattening and storing in multiple kinds for better query support.
"DateTime":…

shivg
- 742
- 1
- 8
- 28
1
vote
1 answer
Storing embedded entity in Datastore, it's ignoring exclude_from_indexes from embedded
I'm trying to have a embedded entity with a field that is larger than 1500bytes. Based on the documentation, it's recommended to exclude that field from Indexes, and it should allow 1MB.
I add that field to the exclude_from_indexes key of the…

igama
- 58
- 1
- 8
1
vote
1 answer
Datastore: Is there plan to add GQLQuery support?
I am using gcloud-python library for a project which needs to serve following use case:
Get a batch of entities with a subset of its properties (projection)
gcloud.datastore.api.get_multi() provides me batch get but not projection
and…

Vinay
- 80
- 4
1
vote
1 answer
Programmatically get Google Datastore record count and used storage
I need to get Google Datastore usage statistics - storage usage, and record count for my application.
At the moment I only can count fetch all items and count them. But I have no idea how I can get storage amount used.
Is there any reports API I…

Renat
- 417
- 4
- 12
1
vote
2 answers
Is there a simple way (other than redirection) to have a Google App Engine point at another web server for content?
I've set up a free account on Google App Engine, and I currently have something like this deployed:
import webapp2
class MainHandler(webapp2.RequestHandler):
def get(self):
self.redirect('http://x.x.x.x:9000/')
This works and…

John O
- 4,863
- 8
- 45
- 78
1
vote
1 answer
urlfetch_stub.py: Received a 301 to a POST. Redirecting with a GET
After upgraded to the latest SDK 1.9.17, I start to get this error when I run my project with dev_appengine.py locally
INFO 2014-12-10 09:48:33,364 myapp.py:796] Url: http://saas.examples.com/documents, payload: {'filename': u'testlink.doc',…

Anthony Kong
- 37,791
- 46
- 172
- 304
0
votes
1 answer
Unable to get iam policy for a project's Artifact Registry in GCP using Python GCloud API
I'm trying to access the IAM permissions for the artifact registry of one of my projects through artifactregistry_v1 python API fro GCP.
name_val = "projects/" + REGISTRY_NAME
artifact_registry_client =…

Anushka Vijay
- 13
- 3
0
votes
0 answers
cloud bucket blob download is very slow in cloud run
I am using python sdk to download large (1Gb) object from cloud storage bucket inside cloud run object. cloud run has 8 GB memory and 4 cpus.
I tried it with various chunk size and various worker count.
Below is my code:
bucket =…

Djai
- 188
- 10
0
votes
1 answer
Calling Google Cloud Speech to Text API regional recognizers, using Python Client library, showing error 400 and 404
The goal: The goal is to use Python client libraries to convert a speech audio file to text through a Chirp recognizer.
Steps to recreate the error: I'm creating a recognizer following the steps in the link below,
I am following the instruction and…

M.Hossein Rahimi
- 557
- 2
- 9
- 20
0
votes
1 answer
using time partitioning for bigquery load doesn't upload every row
I'm attempting to use the BigQuery python API client for uploading a large dataframe. The upload works however when specifying a time partition only some rows are uploaded. When time partitioning is omitted all rows are…

在去中国
- 78
- 8
0
votes
1 answer
Google Cloud Storage Python API: blob rename, where is copy_to
I am trying to rename a blob (which can be quite large) after having uploaded them to a temporary location in the bucket.
Reading the documentation it says:
Warning: This method will first duplicate the data and then delete the old blob. This means…

Niklas B
- 1,839
- 18
- 36
0
votes
1 answer
Best Practice - Python Check if a GCP Log Exists
I'm in this situation where I need to verify, with python, if a certain GCP log exists.
I've built a precise filter that, if the service works, return a single log. Else, doesn't return anything.
Here is my code, it works, but it doesn't seem a best…

Girolamo
- 326
- 3
- 11
0
votes
1 answer
On GCP, using the python pubsub client, how to list only a subset of subscriptions based on a filter
On the gcloud cli, when listing the pubsub subscriptions of a project, it is possible to filter results by using the --filter flag. Here is an example:
gcloud --project=my-project pubsub subscriptions list --filter=my-filter-string…

Emmanuel Sciara
- 180
- 1
- 9
0
votes
1 answer
How to use the Firebase emulator, Python, and security rules
I am setting up a Firebase project with some security rules, e.g. from my firestore.rules:
match /user_private/{uid} {
allow read: if request.auth != null && request.auth.uid == uid;
...
I have a Python script that uses the admin SDK which, as…

kris
- 23,024
- 10
- 70
- 79