How do I calculate the size of an entity stored in Google App Engine? -
Is there an easy way to calculate the size of the entity stored in app engine? I would like to know how to kill the upper limit of 1 MB on the unit size is a special unit
app engine Stores each unit as one. You can use the Example Usage: In the comments given below, kiketo indicates that a different approach is needed for the db.model_to_protobuf ()
function to manually convert your unit into a proto, and then set the standard len () to set its size in bytes. / Code> method. / P>
to google.appengine.ext import db sz_in_bytes = len (db.model_to_protobuf (some_entity). Encode ())
Updates for NDB
ndb
organizations (thanks kekato!): < / P>
lane (some_entity._to_pb (). Encode ())
Comments
Post a Comment