Questions tagged [ndb]

20 questions
4
votes
1 answer

Migrate from `ndb` to SQLalchemy?

How do I migrate a codebase from ndb to SQLalchemy? Tempted to write a parser/emitter, taking in the 40+ ndb.Model of my codebase and generate sqlalchemy.schema.Table or Base inheriting classes. But that doesn't: solve the data migration…
3
votes
0 answers

ndbd nodes stuck waiting for each other

I have an NDB cluster made of two management instances, two ndbd(data nodes) instances and two SQL nodes instances. The management nodes are sharing a VM with the data nodes and the SQL nodes hold their own VMs. I am attempting to use dynamic…
Galyushi
  • 31
  • 1
2
votes
0 answers

Google Chrome Labs ndb - installs but does not run

I have installed ndb, on Xubuntu (Ubuntu 20.04) according to the instructions here. I had to follow the instructions here, to get it to install, i.e. sudo npm install -g ndb --unsafe-perm=true --allow-root When I try to, in my project folder,…
kpollock
  • 3,899
  • 9
  • 42
  • 61
1
vote
2 answers

ndb.put_multi_async with cloud ndb

The Google cloud ndb documentation doesn't say much about async operations. In the old days, I would do this @ndb.toplevel @flask.route('/', methods=['GET']) def page(): for x in xxx: ndb.put_multi_async([...]) return 'Done',…
new name
  • 15,861
  • 19
  • 68
  • 114
0
votes
0 answers

How to preserve order for cards in a Kanban board in Google Cloud NDB?

I'm building a Kanban board and I want to preserve the order of cards that appear on my Kanban board. I have explored the possibility of storing the keys of the cards in an Array attribute in an NDB model but the limit on that is only 1mb for a…
0
votes
0 answers

How to execute await in console when using puppeteer ndb?

I am running ndb to debug my puppeteer scripts. When I put a breakpoint and use console to make some evaluation on selection such as: h1 = await page.$eval("h1", el => el.innerText); I got as result an Promise How can I retrieve the result ? I…
yarek
  • 11,278
  • 30
  • 120
  • 219
0
votes
1 answer

Exporting Google Cloud User Accounts to AppEngine's Datastore Emulator

I am working with an older AppEngine GCP application and I am trying to setup a local environment with an emulated representation of the user profiles stored in datastore. For this, I am trying to export the gmail user-profiles from my GCP workspace…
0
votes
0 answers

Cannot connect to MySQL database after implementing NDB Cluster

I'm trying to shift from a single instance of a mysql database to using a cluster for redundancy purposes, following the steps I found from here, I thought this was the solution I needed, but I'm getting an error now that I can't seem to find a…
0
votes
1 answer

ndb unable to download chrome and run (Error: read ECONNRESET)

I have tried multiple times to now run ndb. It goes to downloading chrome then throws this error. ndb is getting installed but when opening a file with it I face this error. ` {ndb server.js events.js:291 throw er; // Unhandled 'error'…
0
votes
0 answers

Can the User model be replaced by a Google NDB model in Django?

Usually when we create the the User model by inheriting AbstractUser which is eventually inherited from django.db.models.Model. e.g. from django.contrib.auth.models import AbstractUser class User(AbstractUser): id =…
hassansuhaib
  • 267
  • 3
  • 14
0
votes
0 answers

Chromium isn't installing after i tried debugging my server on VS code

I downloaded ndb and it all worked after that I want to start my server through npm run debug. Where debug is the 'ndb server.js'. I waited for hours and it's still: Downloading Chromium r624492... Is there anything should I download before that? Or…
adam
  • 1
  • 1
0
votes
0 answers

Getting ndb debugger error to display the webpage

I've installed ndb on my linux machine globaly. While running the script with npm command npm run debug for ndb server.js. I'm getting an chrome window with error as shown in the screenshot.
0
votes
1 answer

ndb datastore query fetch_page always returns no cursor and more = false

I have a class which is an ndb.Model. I am trying to add pagination so I added this: @classmethod def get_next_page(cls, cursor): q = cls.query() q_forward = q.order(cls.title) if cursor: cursor =…
David
  • 55
  • 3
  • 10
0
votes
1 answer

Ndb debugger for node.js won't start

Im trying to start the ndb debugger from VS code, but every time i run the "ndb server.js" command, a window opens and closes immediately and i get this error: node:events:491 throw er; // Unhandled 'error' event ^ Error: read…
0
votes
1 answer

Check Entity Size in Google cloud

I am trying to find the entity size in google cloud. However entity._to_pb() is throwing an attribute error. Can anyone help to find entity size from google cloud ndb. from google.cloud import ndb _MAX_ENTITY_SIZE_DATASTORE = 1048572 …
1
2