Skip to content

Latest commit

 

History

History
54 lines (39 loc) · 1.14 KB

File metadata and controls

54 lines (39 loc) · 1.14 KB
.. toctree::
  :maxdepth: 0
  :hidden:

  gcloud-api
  datastore-api
  datastore-entities
  datastore-keys
  datastore-queries
  datastore-transactions
  datastore-batches
  datastore-dataset
  storage-api
  storage-blobs
  storage-buckets
  storage-acl
  pubsub-api


Getting started

Cloud Datastore

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

from gcloud import datastore

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

Cloud Storage

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

from gcloud import storage
storage.set_defaults()
bucket = storage.get_bucket('<your-bucket-name>')
blob = storage.Blob('my-test-file.txt', bucket=bucket)
blob = blob.upload_contents_from_string('this is test content!')