def make_application(methods):
  app = JsonRpcApplication()
  for name, value in methods.iteritems():
    if ":" in value:
      modname, funcname = value.split(":", 1)
      mod = getmod(modname)
      if mod:
        app.add(name, getattr(mod, funcname))
    else:
      modname = value
      mod = getmod(modname)
      if mod:
        app.add_module(mod, name)
  app = HTTPExceptionMiddleware(app)
  return app
dataset/ETHPy150Open IanLewis/kay/kay/ext/jsonrpc2/__init__.py/make_application/original