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
2010-06-01 09:12:56
This stat doesn't reflect current status of DB, not suitable for original purpose of the question.
Eonil
2010-06-09 15:14:01
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
2010-06-10 09:11:09