class Settings(ndb.Model):
    name = ndb.StringProperty()
value = ndb.StringProperty()

@staticmethod
def get(name):
    NOT_SET_VALUE = 'NOT SET'
retval = Settings.query(Settings.name == name).get()
if not retval:
    retval = Settings()
retval.name = name
storing app settings on Google App Engine