Is there a local Google App Engine data viewer? - google-app-engine

I want to use google's online GAE data viewer offline...
Is there some bunch of python code to display all my local data and even schema?

Yes, go to http://localhost:8000/_ah/admin (supposing you're running your local instance with dev_appserver.py).
NOTE: when the app is being deployed locally, it logs to which port the admin page is being binded

Related

Local or development Google Cloud Firestore database with App Engine

In my previous App Engine projects I used the Cloud Datastore, and during development I could debug my app on the local server and it would use a local database, stored in a file I could wipe out if I wanted to start from scratch.
With Cloud Firestore, even when I'm running locally it's talking to my real cloud database. Is there still a local option? Note that I'm not talking about client-side persistence, I'm talking about a mock development DB.
Google recommends setting up multiple projects if you want dev/staging/production, and I'm guessing that's the answer, but I'd like to know before adjusting my workflow.
I think (now only a few months later) that this is supported. When I run my app, using dev_appserver.py, I see a message
INFO 2019-02-14 00:08:56,030 admin_server.py:150] Starting admin server at: http://localhost:8000
Going to that URL shows me all the instances I have been seeing. These seem to persist even when the dev_appserver is restarted. Reading this and other posts I was convinced that my development was using my actual cloud database, but going to https://console.firebase.google.com/project/myproject was showing completely different content.
Just to be sure (because google is google and everything is named the same) I'm using an appengine app and a gcloud project, storing things to Firestore using ndb.Models...
Oh, but careful. My app I was also using the cloudstorage (blobstore?) and even though the localhost:8000 showed these, THESE WERE THE REMOTE INSTANCES.
There is a local emulator for Firestore when using the Firebase CLI:
https://firebase.google.com/docs/rules/emulator-setup

Cannot access admin console for a google cloud endpoints project running on xxx.appspot.com

I have a google cloud endpoint deployed and running on myapi.appspot.com. However, I cannot seem to access the admin console at the URL :
https://myapi.appspot.com/_ah/admin
in the same way as I can when running on localhost at
http://localhost:8080/_ah/admin
I had to go to :
Datastore Viewer under
https://appengine.google.com/
in order to see the data since there seems to be no way to view the data from https://cloud.google.com
It is also accessible under Storage -> Cloud Datastore -> Query as I later found out.

Populate a local Datastore based on appspot Datastore

I have populated a datastore and have webapp2 serving up some graphs to display the data when I go to my deployed appspot site. However, for development purposes I would like to be able to run an instance of Google App Engine locally against the same data. I have read the Google Docs about backup and restore (https://cloud.google.com/appengine/docs/adminconsole/datastoreadmin?csw=1#backup_and_restore) but that doesn't seem to provide any options for populating seed data to the local instance.
Does anyone know how to either export data from the deployed datastore and import it into the local version or to point a local instance of webapp2 to the deployed datastore for read-only transactions?
Here i found a very good way to take dump of data and populate it , in your local database.
http://gbayer.com/big-data/app-engine-datastore-how-to-efficiently-export-your-data/
You have to take the dump , download it , and then read the entities and save them in your local database

Using remote data store on Google App Engine

I am trying to use the remote data store on Google App Engine on localhost, but I really can't get it to work.
I have tried following this advice Remote_api configuration with App Engine which does seem to handle the first request and uses the remote datastore (I think), but on the subsequent request it does not, and I get the error:
"BadRequestError: app s~myapp cannot access app dev~myapp's data"
I have also tried the following:
BadRequestError: app s~myapphr cannot access app dev~myapphr's data. Why?
Google App Engine trying to access dev data
and a lot of other suggestions, but without any luck.
Any ideas on how to use the remote datastore on localhost ?
thanks
Thomas

running GAE GQL in Datastore Viewer in development

I have seen many references to using GQL in the "GAE Datastore viewer" but I just cant find a place to do that...
I am using the GAE JAVA SDK v1.8.8 and accessing the Data Store viewer via http://localhost:8899/_ah/admin/datastore.
Was this option removed? or should I somehow enable it?
Using GQL is not part of the local development server. It is available in the live App Engine console for your application.
The development web server includes a Datastore Viewer (/_ah/admin/datastore) via which you can only browse the local datastore.

Resources