Question

I am developing an app on Google App Engine (SDK version 1.7.0 on Windows) that I need to test often, and this testing involves a lot of GQL queries on the datastore.

You can run GQL queries at the browser in App Engine's admin interface online:

GQL query on remote server

But this seems to be not possible on the SDK admin console on localhost. There is no such option:

No GQL query on local host

So it seems I can run GQL queries only through python scripts on my localhost.

It's not convenient to write a python script every time to query the results for short tasks here and there. Also, if you do it at the online admin interface, you can see the query results immediately in a nice table below. If you want to visualize all your query results in a browser window through a python script you'd have to write a lot more code, basically trying to rewrite what Google has already done very well at their server admin interface.

So I am stuck having to do this at the browser on the App Engine admin interface after deployment, which keeps adding to my allowed operations count until I have soon hit my free daily quota limit.

So isn't there any way to run GQL queries (non-programmatically, on a browser) on my localhost?

Was it helpful?

Solution

You have the Interactive Console for that, you get run GQL query there.
For example you can run following code in the Interactive Console:

from google.appengine.ext import db
q = db.GqlQuery("SELECT * FROM Song WHERE composer = 'Lennon, John'")
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top