Questions tagged [app-engine-ndb]

NDB is a better datastore API for the Google App Engine Python runtime. It provides an improved interface over ext.db, and includes support for parallel processing with coroutines.

NDB is a better datastore API for the Google App Engine Python runtime, and currently a standard component of the App Engine Python SDK and the Python runtime.

The NDB API provides persistent storage in a schemaless object datastore. It supports automatic caching, sophisticated queries, and atomic transactions. NDB is well-suited to storing structured data records.

Documentation.

Conversion guide from old db.

Original [deprecated] project.

1288 questions
0
votes
1 answer

What can cause this difference between prod and dev?

Same code, in production don't work while in development yes. models: class Comput(ndb.Model): @staticmethod def membership(user): q = ndb.gql("SELECT * FROM Members WHERE member = :1", user) result = q.fetch() return…
Gianni Di Noia
  • 1,577
  • 10
  • 25
0
votes
1 answer

There is a way to access ndb model class property from jinja2 template

I am using Appengine 1.6.5, accessing a NDB model class property from a jinja2 template I got None, instead I got the right result accessing the same propery on a loop. to explain the problem I post some code --- Models --- class…
rp_189
  • 1
  • 1
0
votes
1 answer

How can I get a unique identifier for a datastore entry clientside using ndb?

I'm am moving to using ndb now that it's out of the experimental phase. There are a few things that I need to rethink and one thing I am having trouble with is grabbing a unique identifier for a model entity client side. I grab entities as follows…
user714852
  • 2,054
  • 4
  • 30
  • 52
0
votes
1 answer

Querying for Entities with no parents

I'm working on converting an application from db to ndb, and am working on making my queries more efficient. The application has become a bit slow with the increase in amount of data, causing us to realize that the queries are pretty…
0
votes
1 answer

KeyProperty object has no attribute get

I placed a _post_put_hook into one of my NDB model types so that that whenever an entity of that type were put, it would invalidate a memcache key. This key is made up with the urlsafe version of the settings key. However, when this code runs, it…
rhefner1
  • 464
  • 4
  • 13
0
votes
2 answers

how to display parent entity while looping through child entities in Jinja2 template

How to use this solution https://stackoverflow.com/a/10067749/604240 in jinja 2 template?
fusionstrings
  • 1,025
  • 2
  • 13
  • 23
0
votes
2 answers

Structured Property accessing Parent

I have a main property that has a structured property. I have a property defined inside the structured property and it needs access to the parent property's values. The syntax I tried was self.key.parent().email, but that didn't do the trick. How…
rhefner1
  • 464
  • 4
  • 13
-1
votes
1 answer

Video model and ndb

In appengine I deployed python code with this model for videos to be uploaded. I enabled video uploads It appears instances of model "Video" in the datastore when a video is uploaded. I think the class should be used with ndb library instead of the…
-1
votes
1 answer

Setting an entity's key in NDB in Google App Engine

How do I set an entity's key in my code. Example, I have a user class class User(ndb.Model) email I want to be able to set email property and query using email property my_user = User(email='xyz@ab.com') Above statement sets email property, but…
user462455
  • 12,838
  • 18
  • 65
  • 96
-1
votes
1 answer

Is there any way to get the entity group of the current transaction in Google Datastore?

The datastore sets the entity group of a transaction automatically. I would like to find out what this is set to while I am inside the transaction. To elaborate, suppose I have the following function foo that runs in a…
user2771609
  • 1,867
  • 1
  • 15
  • 36
-1
votes
1 answer

How to read, update, delete entities in Google App Engine NOT models (ndb.Model or db.Model)?

I want to read, convert and delete some entities from datastore which does not have ndb.Model or db.Model classes. When I trying it with GQL it leads to: KindError: No implementation for kind 'SomeModel' I do not want to create 'SomeModel' class…
-1
votes
1 answer

Delete ndb EntitiesByProperty index table

I have an NDB model with some obsolete EntitiesByProperty indexes. Some belong to properties that are no longer part of the schema (but they do exist on some old entities), and some belong to properties that are never used for queries (but they were…
sagie
  • 2,998
  • 3
  • 22
  • 31
-1
votes
1 answer

python ndb: what's the best way of implementing categories

I have an ndb.Model: class Product(ndb.Model): pass it needs to be categorized in a category tree. the categories are NOT dynamic, meaning they cannot change. prefferably not implemented using a class Category(ndb.Model) because having the…
-1
votes
1 answer

Design choice in creating an App

I am trying to build a reminder app using google app engine and python ndb. Now i have two entities User and Reminder. What would be a better design: Have Reminder as a separate entity and have a list of reminders set by User and reminders for user…
-1
votes
2 answers

Distinct username's in python ndb

I have a few doubts regarding using python ndb. I am using proto datastore. I have a class User class User( EndpointsModel ): name = ndb.StructuredProperty( Name, required=True ) dateOfBirth = ndb.DateProperty(required=True) userName =…
1 2 3
85
86