def describe_service(service_class):
  descriptor = ServiceDescriptor()
  descriptor.name = service_class.__name__
  methods = []
  remote_methods = service_class.all_remote_methods()
  for name in sorted(remote_methods.iterkeys()):
    if name == 'get_descriptor':
      continue

    method = remote_methods[name]
    methods.append(describe_method(method))
  if methods:
    descriptor.methods = methods

  return descriptor
Build descriptor for service.
dataset/ETHPy150Open AppScale/appscale/AppServer/lib/protorpc/protorpc/descriptor.py/describe_service