def model_to_protobuf(model_instance, _entity_class=datastore.Entity):

  return model_instance._populate_entity(_entity_class).ToPb()
Encodes a model instance as a protocol buffer.
dataset/ETHPy150Open AppScale/appscale/AppServer/google/appengine/ext/db/__init__.py/model_to_protobuf