4
votes

I have a project on GAE wich use Google Cloud Datastore. Of course, I have a development environment on my local machine(with local Datastore), and stage environment and production environment on the Google Cloud with two Datastores(stage & prod) for each environment. When I run a project on my local machine NDB connect me to my local Datastore. And it's a problem because I want to connect to Google Cloud Datastore

How can I run the project on my local machine and connect it Google Cloud Datastore(stage)?

I use Python, and run the project via: dev_appserver.py app.yaml

1
Can you provide us with why you want to remotely connect to Datastore in Google Cloud?Are you sure it's the only way you can accomplish what you're trying to? I could be wrong, but I can't remember anything like that in their documentation and I believe it wasn't meant to be used this way...Renato Byrro
For example, I want to make migration for all my data in the Google Cloud Datastore.Igor Kopanev
Actually, it looks like there's an API for remote connection, but I read it's quite slow. Have you tried these alternatives: this and [this?Renato Byrro
... and this?Renato Byrro
Another idea: if your data is originally in SQL, you could import into Cloud SQL temporarily and then migrate to Datastore. Please let us know if any of those options solves you problem and how you worked it out... May be useful for someone else in the future.Renato Byrro

1 Answers

-2
votes

You have to specify the path to your codebase. IF you are running the command from the same folder, use .

dev_appserver.py .