Hi Kwame, You can get the size of an entity by calling len(db.model_to_protobuf(your_model)). This doesn't include index overhead (just like the datastore stats), so you'll need to estimate that.
-Nick Johnson On Mon, Aug 1, 2011 at 8:33 PM, Kwame <iweg...@gmail.com> wrote: > Thanks Nick. > Any tips on how to get data size for entities? I looked through the > Appengine Python API, and I don't see a way to get stats like size, > etc. > Thanks. > > On Aug 1, 1:57 am, "Nick Johnson (Google)" <nick.john...@google.com> > wrote: > > Hi Kwame, > > > > We don't calculate statistics for arbitrary subsets of your data - this > is > > impractical, since we can't know what way you'll want to slice-and-dice > your > > data ahead of time. If you want these statistics, you'll need to maintain > > them yourself. > > > > -Nick Johnson > > > > > > > > > > > > > > > > > > > > On Sat, Jul 30, 2011 at 9:41 AM, Kwame <iweg...@gmail.com> wrote: > > > I'm trying to use Appengine Datastore statistics in Python. The API > > > docs (http://code.google.com/appengine/docs/python/datastore/ > > > stats.html) > > > show how to get stats for all entities or entities by name and > > > property. Does anyone know of examples of how to get stats for > > > particular entities in an application? For example how to get the > > > amount of disk space used by all entities belonging to one user in an > > > application? > > > > > -- > > > You received this message because you are subscribed to the Google > Groups > > > "Google App Engine" group. > > > To post to this group, send email to google-appengine@googlegroups.com > . > > > To unsubscribe from this group, send email to > > > google-appengine+unsubscr...@googlegroups.com. > > > For more options, visit this group at > > >http://groups.google.com/group/google-appengine?hl=en. > > > > -- > > Nick Johnson, Developer Programs Engineer, App Engine > > -- > You received this message because you are subscribed to the Google Groups > "Google App Engine" group. > To post to this group, send email to google-appengine@googlegroups.com. > To unsubscribe from this group, send email to > google-appengine+unsubscr...@googlegroups.com. > For more options, visit this group at > http://groups.google.com/group/google-appengine?hl=en. > > -- Nick Johnson, Developer Programs Engineer, App Engine -- You received this message because you are subscribed to the Google Groups "Google App Engine" group. To post to this group, send email to google-appengine@googlegroups.com. To unsubscribe from this group, send email to google-appengine+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-appengine?hl=en.