Skip to content
This repository was archived by the owner on Sep 28, 2023. It is now read-only.

Latest commit

 

History

History
52 lines (37 loc) · 1.11 KB

File metadata and controls

52 lines (37 loc) · 1.11 KB
.. toctree::
  :maxdepth: 0
  :hidden:

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


Getting started

Cloud Datastore

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

from gcloud import datastore
datastore.set_defaults()

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
bucket = storage.get_bucket('<your-bucket-name>', '<your-project-id>')
key = bucket.new_key('my-test-file.txt')
key = key.upload_contents_from_string('this is test content!')