Skip to content

Latest commit

 

History

History
111 lines (83 loc) · 2.41 KB

File metadata and controls

111 lines (83 loc) · 2.41 KB
.. toctree::
  :maxdepth: 2
  :hidden:

  releases
  core/index
  asset/index
  automl/index
  bigquery/usage
  bigquery_datatransfer/index
  bigtable/usage
  container/index
  dataproc/index
  datastore/index
  dlp/index
  dns/usage
  firestore/index
  iot/index
  kms/index
  language/usage
  pubsub/index
  oslogin/index
  resource-manager/api
  runtimeconfig/usage
  spanner/usage
  speech/index
  error-reporting/usage
  monitoring/index
  logging/usage
  redis/index
  storage/index
  tasks/index
  texttospeech/index
  translate/usage
  vision/index
  videointelligence/index
  websecurityscanner/index

Google Cloud Client Library for Python

Getting started

For more information on setting up your Python development environment, such as installing pip and virtualenv on your system, please refer to Python Development Environment Setup Guide for Google Cloud Platform.

Cloud Datastore

Google Cloud Datastore is a fully managed, schemaless database for storing non-relational data.

Install the google-cloud-datastore library using pip:

$ pip install google-cloud-datastore
Example
from google.cloud import datastore

client = datastore.Client()
key = client.key('Person')

entity = datastore.Entity(key=key)
entity['name'] = 'Your name'
entity['age'] = 25
client.put(entity)

Cloud Storage

Google Cloud Storage allows you to store data on Google infrastructure.

Install the google-cloud-storage library using pip:

$ pip install google-cloud-storage
Example
from google.cloud import storage

client = storage.Client()
bucket = client.get_bucket('<your-bucket-name>')
blob = bucket.blob('my-test-file.txt')
blob.upload_from_string('this is test content!')

Resources