Hi Vladimir,

  You could fetch the entity, then try something like:
     entity = db.get(your_key)
     est_size = len(db.model_to_protobuf(entity).Encode())

  I am not honestly sure exactly how this encoded size translates to
what is stored, but I suspect it is in the ballpark.

  You could also try to come up with an estimate based on the info in
the datastore statistics, and/or using the info in the 'How Entities
and Indexes are Stored' article.
http://code.google.com/appengine/articles/storage_breakdown.html


  In either case your are going to be taking a WAG at what the indexes
are actually using.


  Just some ideas.



Robert






On Thu, Nov 11, 2010 at 19:40, Vladimir Prudnikov <pru...@gmail.com> wrote:
> Is there any way to get the size of any particular entity in datastore
> that counts toward the Stored Data?
> For example I'd like to limit users storage or bill depending on
> stored data size. May be approximate size because of indexes.
>
> --
> 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-appeng...@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.
>
>

-- 
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-appeng...@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.

Reply via email to