@@ -0,0 +1,1205 @@
+from protorpc import remote%0A%0A# Google Cloud Endpoints%0A%0Adef get_user_from_endpoints_service(endpoints_service):%0A  request_state = endpoints_service.request_state%0A  request_state.app = get_app()%0A  request_state.cookies = webob.request.RequestCookies(%7B%0A    %22HTTP_COOKIE%22: request_state.headers.get(%22cookie%22),%0A  %7D)%0A  session_store = sessions.SessionStore(request_state)%0A  session_store.config%5B%22secret_key%22%5D = get_namespaced_secret_key(namespace_manager.get_namespace())%0A  return User.load_from_session(session_store.get_session())%0A%0Aclass CRUDServiceClass(remote._ServiceClass):%0A%0A  @staticmethod%0A  def __add_prefix(name, dct):%0A    new_dct = dict()%0A    for key, value in dct.iteritems():%0A      if not key.startswith(%22_%22):%0A        key = %22_%7B0%7D_%7B1%7D%22.format(name, key)%0A      new_dct%5Bkey%5D = value%0A    return new_dct%0A%0A  def __new__(cls, name, bases, dct):%0A    new_dct = CRUDServiceClass.__add_prefix(name, dct)%0A    return super(CRUDServiceClass, cls).__new__(cls, name, bases, new_dct)%0A%0A  def __init__(cls, name, bases, dct):%0A    new_dct = CRUDServiceClass.__add_prefix(name, dct)%0A    super(CRUDServiceClass, cls).__init__(name, bases, new_dct)%0A%0Aclass CRUDService(remote.Service):%0A%0A  __metaclass__ = CRUDServiceClass%0A

add utils for endpoints