views:

20

answers:

1

How can I get all entity kinds from GAE server? Is this possible? I want to make a DB manager tool for GAE.

A: 

The best way to do this is to programmatically read the datastore stats. See the docs for doing so in Python or Java. Here's a simple example in Python:

>>> from google.appengine.ext.db import stats
>>> kinds = stats.KindStat.all().fetch(1000)
>>> kind_names = [x.kind_name for x in kinds]
>>> kind_names
[u'A', u'AAFoo', u'AModel', u'ASDBD', u'Abc', u'Accumulator', u'Activity', # ...

You can test this for yourself in the interactive console.

The datastore stats also provide piles of other details that will be useful in writing a datastore management tool. Good luck!

Nick Johnson
This stat doesn't reflect current status of DB, not suitable for original purpose of the question.
Eonil
You didn't say anything about that in the question. Further, it's the only way - so if you're not happy with it, there's no alternative available.
Nick Johnson