views:

52

answers:

1

Does CPython have any library that helps to write binding-independent services?

I have found some SOAP libraries for Python, but it misses the flexibility of choosing the binding at runtime.

+2  A: 

Packages such as SimpleXMLRPCServer (part of the Python standard library), SimpleJSONRPCServer, and probably at least some of the SOAP server-side libraries you found (the good ones;-), are based on the concept of registering functions and instances with the package to make them available to clients of the service -- basically you write your service's functionality independently, just exposing that functionality as functions and classes (much as you would for any other application's core logic, not just a service), and then, at runtime (presumably, mostly at server startup time), you register those functions, and instances of those classes, so they become accessible as "the service". I'd call that pretty much a "binding-independent" approach;-).

Alex Martelli