app-engine-ndb Questions

1

I seem to have a memory leak in my Google App Engine app but I cannot figure out why. After narrowing down the lines of code responsible, I have reduced the problem to a simple cron job that run re...

6

Solved

I'm having trouble with Google's App engine indexes. When running my app via the GoogleAppEngineLauncher, the app is working fine. When deploying the app, I get the following error: NeedIndexError...

1

Solved

The recommended path for upgrading a Python 2 AppEngine app to the new runtime is to switch datastore code to Google Cloud NDB. However, I can't find anything about unit testing code that uses Clou...

1

Solved

Suppose you use a transaction to process a Stripe payment and update a user entity: @ndb.transactional def process_payment(user_key, amount): user = user_key.get() user.stripe_payment(amount) # ...
Pontificate asked 27/4, 2019 at 23:9

5

Solved

An NDB model contains two properties: email and password. How to avoid adding to the database two records with the same email? NDB doesn't have UNIQUE option for a property, like relational databas...
Commemorative asked 19/8, 2013 at 11:59

4

Solved

I have run into an interesting limit with the App Engine datastore. I am creating a handler to help us analyze some usage data on one of our production servers. To perform the analysis I need to qu...
Harmonic asked 16/7, 2012 at 17:24

1

Solved

I'm having contention problems in Google App Engine, and try to understand what's going on. I have a request handler annotated with: @ndb.transactional(xg=True, retries=5) ..and in that code I...

3

Solved

I think there is a memory leak in the ndb library but I can not find where. Is there a way to avoid the problem described below? Do you have a more accurate idea of testing to figure out where the...
Ezmeralda asked 9/10, 2015 at 10:49

1

A major selling point of Google Cloud Datastore is that it provides strong consistency within an entity group. Cloud Datastore ensures that entity lookups by key and ancestor queries always receiv...

3

Solved

When I create an object with ndb's method put it creates the key automatically of the type Key(kind, id) where id is a number. All over the documentation it shows that you can use a string for the ...
Jolin asked 24/10, 2012 at 21:50

1

Solved

I’m investigating again the unexpected occurrence of TransactionFailedError (too much contention on these datastore entities... in cases, where the code only reads entity groups that are blamed for...

1

Solved

I'm writing simple to code to access dev server. Both dev server and datastore emulated have been started locally. from google.appengine.ext import ndb class Account(ndb.Model): name = ndb.Strin...
Chrischrism asked 20/2, 2017 at 6:47

4

Solved

I want to get an entity key knowing entity ID and an ancestor. ID is unique within entity group defined by the ancestor. It seems to me that it's not possible using ndb interface. As I understand d...
Perkoff asked 18/10, 2012 at 12:39

1

Solved

I'm using both ndb and search-api queries in my python appengine project. The only official docs on cursors I can find: https://cloud.google.com/appengine/docs/python/datastore/query-cursors ht...
Nicky asked 2/2, 2017 at 16:30

3

Solved

Here's what I'm trying to do: the user submits a time in pacific, once submitted I use .replace to set the timezone to Pacific. Pacific = time.USTimeZone(-8, "Pacific", "PST", "PDT") addEvent.dat...
Euchromosome asked 6/10, 2012 at 21:14

2

Solved

I am completely novice at AJAX. I am familiar with HTML/CSS, jQuery and beginner at GAE and Python. In an effort to understand how AJAX works, I would like to know how AJAX might be used (actual c...

2

Solved

ndb: (from google.appengine.ext import ndb) datastore: (from gcloud import datastore) What's the difference? I've seen both of them used, and hints they both save data to google datastore. Why ar...

1

Solved

I'd expect the memory usage of my app engine instances (Python) to be relatively flat after an initial startup period. Each request to my app is short lived, and it seems all memory usage of single...

2

Solved

I am leveraging ndb's to_dict method to convert an object's properties into a python dict. From everything I can tell, this method does not include the object's key or parent within the dict as per...
Cissoid asked 31/5, 2013 at 5:9

4

I am trying to create ndb.Model class like Students and subjects class Subject(ndb.Model): name = ndb.StringProperty() class Student(ndb.Model): name = ndb.StringProperty() subject = ndb.KeyPr...
Exponible asked 9/4, 2012 at 17:43

2

Solved

I am trying to write a test for my GAE programme which uses the datastore. Following Google's Documentation, I see that I should be adding the path to my SDK into my PYTHONPATH. I did this using: ...

3

Solved

This seems like it should be an easy question. But the docs don't seem to answer it. Using the example from them, I want to do this: Account.query(Account.title == "best") Except I want to match...
Holp asked 12/1, 2013 at 9:4

3

Solved

Sorry if this question is too simple; I'm only entering 9th grade. I'm trying to learn about NoSQL database design. I want to design a Google Datastore model that minimizes the number of read/wri...

3

My question is about modelling one-to-many relations in ndb. I understand that this can be done in (at least) two different ways: with a repeated property or with a 'foreign key'. I have created a ...
Adam asked 18/12, 2012 at 10:10

2

Solved

I currently have a model in NDB and I'd like to change the property name without necessarily touching NBD. Let's say I have the following: from google.appengine.ext import ndb class User(ndb.Mode...
Colecolectomy asked 8/4, 2015 at 23:34

© 2022 - 2024 — McMap. All rights reserved.