Please note that the contents of this offline web site may be out of date. To access the most recent documentation visit the online version .
Note that links that point to online resources are green in color and will open in a new window.
We would love it if you could give us feedback about this material by filling this form (You have to be online to fill it)



  • Scalable datastore for clients. Google Cloud Datastore is a fully managed, schemaless database for storing non- relational data. Cloud Datastore automatically scales with your users and supports ACID transactions, high availability of reads and writes, strong consistency for reads and ancestor queries, and eventual consistency for all other queries.

  • Your data in the cloud. Each Cloud Datastore instance is fully managed by Google so there is no planned downtime, replication across multiple datacenters, automatic scaling as your traffic increases, and monitoring by Google Engineers.

  • Easy and flexible administration Cloud Datastore is accessible via HTTP using a JSON or Protocol Buffers API, running on top of the Google APIs infrastructure. Cloud Datastore offers Protocol Buffer client libraries for Java and Python as well as support for the Google APIs client libraries . In addition, Cloud Datastore offers a web-based interface for managing your Cloud Datastore instances, and a development server to support local development.

Try it now
  1. Sign up

    1. If you don't already have one, sign up for a Google account .
    2. Create a Google Cloud Datastore enabled project via the Google Cloud Console .
    3. Enable billing from your project's Settings tab.
    4. Enable the Google Cloud Datastore API .
  2. Create a Google Compute instance

    Google Developers Console


    1. From your project's overview page, in the left sidebar, select Compute Engine .
    2. Click New instance .
    3. In the NAME box, enter hello-datastore .
    4. In the ZONE box, select the us-central1-a zone.
    5. In the IMAGE box, choose Debian-7 .
    6. Click Create .

    Cloud SDK on Linux or Mac OS X


    1. Download and install the Cloud SDK.

      You can download and install the Cloud SDK using the following command:

      $ curl https://sdk.cloud.google.com | bash
    2. Restart your terminal to allow changes to your PATH to take affect.

      You can also run source ~/. <bash-profile-file> if you want to avoid restarting your terminal.

    3. Authenticate to the Google Cloud platform by running:
      $ gcloud auth login
    4. Create an instance.
      gcutil --project <PROJECT_ID> addinstance hello-datastore --zone us-central1-a \
                      --service_account_scopes=https://www.googleapis.com/auth/userinfo.email,https://www.googleapis.com/auth/datastore

      Replace <PROJECT_ID> with an existing project ID or the one you just created.

    Cloud SDK on Windows


    1. Download the Cloud SDK and install it.
    2. Launch GoogleCloudSDKInstaller.exe and follow the installation prompts.
    3. Authenticate to the Google Cloud platform by running:
      $ gcloud auth login
    4. Create an instance.
      gcutil --project <PROJECT_ID> addinstance hello-datastore --zone us-central1-a \
                     --service_account_scopes= https://www.googleapis.com/auth/userinfo.email, https://www.googleapis.com/auth/datastore

      Replace <PROJECT_ID> with an existing project ID or the one you just created.

  3. Write data to Google Cloud Datastore from the instance

    1. Connect to the instance using ssh. In the following command, substitute your project's ID for <PROJECT_ID>.
      $ gcutil --service_version="v1" --project="<PROJECT_ID>" ssh --zone="us-central1-a" "hello-datastore"
    2. Install the googledatastore package, and download and unzip the latest version of the google-cloud-datastore samples.
      $ wget https://bootstrap.pypa.io/get-pip.py
      $ sudo python get-pip.py
      $ sudo pip install googledatastore --pre
      $ wget https://github.com/GoogleCloudPlatform/google-cloud-datastore/archive/v1beta2-rev1-2.1.1.tar.gz
      $ tar xvzf v1beta2-rev1-2.1.1.tar.gz
    3. Run the sample code to write an entity to the datastore. In the following command, substitute your project's ID for <PROJECT_ID>.
      $ python google-cloud-datastore-1beta2-rev1-2.1.1/python/demos/trivial/adams.py <PROJECT_ID>
      Meaning of life?
      > 42
      fascinating, extraordinary and, when you think hard about it, completely obvious.
      
    4. Optionally, in the Google Developers Console , view the entity.

      From your project's overview page, select Cloud Datastore and then Query .

      Using Google Developers Console to verify written entity.
  4. What next?

Authentication required

You need to be signed in with Google+ to do that.

Signing you in...

Google Developers needs your permission to do that.