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
-1
votes
1 answer

GAE Transaction Alternatives to overcome entity group limit of 5

Is there an alternative way/strategy which could be used to achieve the same as provided "transaction" in GAE Python? In GAE, "Transaction" helps ensure that all the NDB operations inside a transaction succeed or all are rolled back. I cannot use…
-1
votes
1 answer

App Engine Python27 SDK - NDB Query.iter() QueryIterator returns "Deadlock waiting for, pending" error

Since I am using NDB for my projects, on Python 2.7 SDK, I cannot use Query().iter() normally with Jinja2 templates. My usual code follows this pattern: mc_key = ... instances = memcache.get('instances-%s' % mc_key) if not instances: q_i =…
-1
votes
2 answers

Google App Engine: Modifying 1000 entities

I have about 1000 user account entities like this: class UserAccount(ndb.Model): email = ndb.StringProperty() Some of these email values contain uppercase letters like JohnathanDough@email.com. I want to select all the email values from all…
hyang123
  • 1,208
  • 1
  • 13
  • 32
-1
votes
1 answer

App Engine's ndb.transactional function not working

Can anyone please point out what part of this is not allowed in a transactional function? @ndb.transactional(propagation=ndb.TransactionOptions.INDEPENDENT) def set_visibility(action, key): item = key.get() key = key.urlsafe() if item: …
yowmamasita
  • 4,810
  • 3
  • 17
  • 17
-1
votes
1 answer

how to minimize db calls in ndb and optimize python code?

I have a collection of properties. some of these properties are given review score. review is saved in AggregateReview table. I have to sort these properties on basis of their score. Property with highest review score will come first.When all…
Subodh Deoli
  • 87
  • 1
  • 7
-1
votes
1 answer

How to import big data to NDB

I have a NDB model: class mymodel(ndb.Model): id =ndb.IntegerProperty(indexed=True) region_id = ndb.IntegerProperty() name = ndb.TextProperty() address =ndb.TextProperty() is_enabled = ndb.BooleanProperty() My app is High Replication…
-2
votes
1 answer

Access to deleted entity in Appengine NDB

I am using NDB in an Appengine project. I am using _post_delete_hook for doing some operations after some entity is deleted. In this method I have the key. But when I do key.get() I get an error. Here is some example code. [friends/models.py] from…
francofuji
  • 17
  • 3
-2
votes
2 answers

Complicated, costly many-to-many entity references

I have four main kinds: Account, Company, Service and Address. I would like Address entities to be shared between Company and Service entities. Account: this is the user account (email, password) Company: A business which provide Services…
-2
votes
1 answer

BadValueError when updating ndb entity

I am implementing a web application based on Google App Engine, Relying on ndb. I am facing a strange problem when trying to update one of the many entities in my db. When I try to update one of its properties (i.e. a string property) I get…
-2
votes
1 answer

CloudSql vs NDB Datastore for very frequent read/update

I am new to Google app engine services. I am developing an application which requires very frequent reads and updates of existing values operations ( every 5 sec or so ). I want to inquire which amongst CloudSql or NDB datastore is better suitable…
-2
votes
1 answer

adding structured property to ndb.model : google app egnine

I have two classes in this way: class comment(ndb.Model): date =ndb.StringProperty() title=ndb.StringProperty() name=ndb.StringProperty() content=ndb.StringProperty() class report(ndb.Model): …
user3376321
  • 849
  • 2
  • 9
  • 21
-2
votes
1 answer

How to reflect changes in data base automatically?

I have an ndb entry that can be changed by a rpc call to my app engine app. I also have a python web app creating an html site to show the entry. How do i show the changes when they happen without the need to do refresh page? I am new at writing…
amir
  • 1,332
  • 8
  • 15
-3
votes
1 answer

Datastore entity for post comment

I am making a simple app where one can post any thing and anyone can comment on that post. Do I need to create an entity group making every post as parent and comments as children?If I am wrong how to model the data having post and comment as…
1 2 3
85
86