简体   繁体   English

Windows中的Python xmlrpc服务器

[英]Python xmlrpc server in windows

I'm looking for a library that can help me build a good XMLRPC server in Python that could run on Windows. 我正在寻找一个可以帮助我在Python中构建可以在Windows上运行的良好XMLRPC服务器的库。 The SimpleXMLRPCServer class looks fine but I don't know if it will suit all my needs, since I'd like to be able to connect from multiple clients at the same time. SimpleXMLRPCServer类看起来不错,但是我不知道它是否适合我的所有需求,因为我希望能够同时从多个客户端进行连接。 I found this on GitHub, but I don't know if it'll work. 我发现这个在GitHub上,但我不知道这是否会工作。

Any suggestions/ideas? 有什么建议/想法吗?

I like CherryPy for XMLRPC using the built-in tool/dispatcher, and it runs on Windows as far as I know. 我喜欢使用内置工具/调度程序对XMLRPC使用CherryPy ,据我所知它可以在Windows上运行。

But you really need to ask yourself why you want to do RPC vs. a RESTful service in 2010. XMLRPC is very limited in the variable types allowed, and adds significant encapsulation overhead, and requires a client that can talk XMLRPC. 但是您真的需要问自己,为什么要在2010年相对于RESTful服务进行RPC。XMLRPC在允许的变量类型方面非常有限,并且会增加大量的封装开销,并且需要能够使用XMLRPC的客户端。

I also like CheeyPy, but have also used Twisted for such needs. 我也喜欢CheeyPy,但也使用Twisted满足此类需求。 Pretty simple to use and Twisted has defereds and helper functions like deferToThread and callLater to allow for blocking code to act in a non-blocking fashion. 使用起来非常简单,并且Twisted具有deferToThread和callLater之类的defers和辅助函数,以允许阻塞代码以非阻塞方式运行。

Take a look at http://twistedmatrix.com/documents/current/web/howto/xmlrpc.html for a simple example. 让我们看一下http://twistedmatrix.com/documents/current/web/howto/xmlrpc.html中的简单示例。

I like to use circuits for stuff like this ( but it's not for everyone ). 我喜欢将电路用于这样的事情( 但这并不适合所有人 )。 There's a simple example in the examples/web/ directory in the source repository. 源存储库中的examples / web /目录中有一个简单的示例。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM