Questions tagged [gcloud-python]

Google Cloud Client Library for Python - an idiomatic, intuitive, and natural way for Python developers to integrate with Google Cloud Platform services, like Cloud Datastore and Cloud Storage.

gcloud is a client library for accessing Google Cloud Platform services that significantly reduces the boilerplate code you have to write. The library provides high-level API abstractions so they're easier to understand. It embraces idioms of Python, works well with the standard library, and integrates better with your codebase. All this means you spend more time creating code that matters to you.

gcloud is configured to access Google Cloud Platform services and authorize (OAuth 2.0) automatically on your behalf. With a one-line install and a private key, you are up and ready to go. Better yet, if you are running on a Google Compute Engine instance, the one-line install is enough!

More information

60 questions
1
vote
3 answers

Cannot get gcloud to work with Python and Pycharm

I am trying to connect to the Google App Engine Datastore from my local machine. I have spent all day digging in to this without any luck. I have tried the approach here (as well as alot of other suggestions from SO such as Using gcloud-python in…
ThomasD
  • 2,464
  • 6
  • 40
  • 56
1
vote
1 answer

How to use gcloud on google app engine?

I'm trying to use client and buckets of gcloud on google app engine. First, I install gcloud. pip install gcloud -t my_project_directory Second,I start to import gcloud and use it. Here is my code: from gcloud import storage class…
1
vote
3 answers

How to use Google Cloud Client Library for Python to configure the gcloud project

Hi I am trying to use the Google Cloud Client Library for Python to convert a shell script using the gcloud CLI to launch a container to python. In searching through the documentation (https://googlecloudplatform.github.io/gcloud-python/), I have…
1
vote
1 answer

Installing gcloud after GoogleAppEngineLauncher webapp2 import not found

I've been running GoogleAppEngineLauncher for a couple days, without incident. This morning I installed the gcloud package from Google. The issue is that now, regardless of where I run my AppEngine project from (GoogleAppEngineLauncher or using…
1
vote
1 answer

How to access google cloud docker registry from Python

I want to retrieve a list of images from Google Cloud Docker Registry via https://gcr.io http API. I found a way to do it from command line like this: curl -u _token:$(gcloud auth print-access-token) https://gcr.io/v2/{project}/{repo}/tags/list But…
1
vote
0 answers

How can I athenticate dockerpy using gcloud API?

I have tried to push a Docker Image to "gcr" Registry programmatically. The "gcloud docker --authorize-only" gives me a short - live authentication. How can I perform authentication using python gcloud API without shell execution?
worroc
  • 117
  • 8
1
vote
1 answer

Query google datastore by key in gcloud api

I'm trying to query for some data using the gcloud api that I just discovered. I'd like to query for a KeyPropery. e.g.: from google.appengine.ext import ndb class User(ndb.Model): email = ndb.StringProperty() class Data(ndb.Model): user…
1
vote
0 answers

Exporting BigQuery table to GCS using gcloud-python

The example here is outdated https://googlecloudplatform.github.io/gcloud-python/stable/bigquery-usage.html#exporting-data-async. The example gives error: AttributeError: 'Table' object has no attribute 'export_to_storage' How do I construct and run…
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…
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…
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…
0
votes
1 answer

Pushing packages to a Python artifact registry repository

what are ways to push packages to an AR Python repository? I tried to look at the API documentation, but only operation there I could find related to uploading a package, is the UpdateRepositoryRequest, which seems to update the repository with…
Markus T
  • 19
  • 3
0
votes
1 answer

gsutil iam ch command using python

I am trying to use python to do the same functionality as this command: gsutil iam ch group:group_name@gmail.com:objectAdmin gs://bucket_name I am trying to give an objectAdmin role to a group using python. The above command works well in cloud…