Search code examples
pythongoogle-app-enginemodelsgoogle-mirror-apigoogle-glass

Where to define database models for Google glass glasswares


I'm practicing writing glasswares for Google glass based on python quick start project. I'd like to collect some extra app specific data from the user and store them in database.

  1. How could I achieve that? There is a model.py in the main directory of the base code but I'm not sure whether that is the right place or not.
  2. Can I use ndb?

Solution

  • The example code is an AppEngine project, and model.py is indeed the place to put your model code. You'll see there is already a model there that keeps track of your authentication credentials. The ndb should work perfectly fine.