rpc对金字塔web框架的支持
pyramid_rpc的Python项目详细描述
pyramid_rpc是一个与rpc相关的加载项包,使 创建rpc服务。
frompyramid.configimportConfiguratorfrompyramid_rpc.jsonrpcimportjsonrpc_method@jsonrpc_method(endpoint='api')defsay_hello(request,name):return'hello, %s!'%namedefmain(global_conf,**settings):config=Configurator(settings=settings)config.include('pyramid_rpc.jsonrpc')config.add_jsonrpc_endpoint('api','/api')config.scan(__name__)returnconfig.make_wsgi_app()if__name__=='__main__':fromwsgiref.simple_serverimportmake_serverapp=main({})server=make_server('',8080,app)server.serve_forever()
支持和文档
请参见pyramid_rpc website查看 文档,报告错误,并获得支持。
许可证
pyramid_rpc在bsd派生的Repoze Public License下提供。