Search icon CANCEL
Subscription
0
Cart icon
Your Cart (0 item)
Close icon
You have no products in your basket yet
Arrow left icon
Explore Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Conferences
Free Learning
Arrow right icon
Arrow up icon
GO TO TOP
Python for Google App Engine

You're reading from   Python for Google App Engine Master the full range of development features provided by Google App Engine to build and run scalable web applications in Python

Arrow left icon
Product type Paperback
Published in Jan 2015
Publisher Packt
ISBN-13 9781784398194
Length 198 pages
Edition 1st Edition
Languages
Arrow right icon
Author (1):
Arrow left icon
Massimiliano Pippi Massimiliano Pippi
Author Profile Icon Massimiliano Pippi
Massimiliano Pippi
Arrow right icon
View More author details
Toc

Table of Contents (10) Chapters Close

Preface 1. Getting Started FREE CHAPTER 2. A More Complex Application 3. Storing and Processing Users' Data 4. Improving Application Performance 5. Storing Data in Google Cloud SQL 6. Using Channels to Implement a Real-time Application 7. Building an Application with Django 8. Exposing a REST API with Google Cloud Endpoints Index

Persisting data in Datastore

Even if users can log in and submit a note, our application isn't very useful until notes are stored somewhere. Google Cloud Datastore is the perfect place to store our notes. As part of App Engine's infrastructure, it takes care of data distribution and replication, so all we have to do is define store and retrieve our entities using the Python NDB (Next DB) Datastore API.

Note

There are currently two APIs available in the Python runtime to interact with Datastore: the DB Datastore API, also known as ext.db, and the NDB Datastore API. Even if both the APIs store exactly the same data in Datastore, in this book, we will only use NDB; it is more recent, provides more features, and its API is slightly more robust.

An entity has one or more properties that in turn have a name and a type; each entity has a unique key that identifies it, and instead of storing different data in different tables as in a relational database, every entity in Datastore is categorized...

lock icon The rest of the chapter is locked
Register for a free Packt account to unlock a world of extra content!
A free Packt account unlocks extra newsletters, articles, discounted offers, and much more. Start advancing your knowledge today.
Unlock this book and the full library FREE for 7 days
Get unlimited access to 7000+ expert-authored eBooks and videos courses covering every tech area you can think of
Renews at $19.99/month. Cancel anytime