There are hundreds of systems to perform RPC in Python, but because it has powerful networking tools and is a dynamic language, everything we need is already built into the standard library.
Remote procedure calls
How to do it...
You need to perform the following steps for this recipe:
- Using xmlrpc.server, we can easily create an XMLRPC-based server that exposes multiple services:
import xmlrpc.server class XMLRPCServices: class ExposedServices: pass def __init__(self, **services): self.services = self.ExposedServices() for name, service in services.items(): setattr(self.services, name, service) def serve(self, host='localhost', port=8000): print(&apos...