@@ -0,0 +1,853 @@
+import socket%0Afrom http.client import HTTPConnection%0Afrom typing import Dict, List, Optional, Tuple, Union%0Afrom xmlrpc import client%0A%0A%0Aclass UnixStreamHTTPConnection(HTTPConnection):%0A    def connect(self) -%3E None:%0A        self.sock = socket.socket(socket.AF_UNIX, socket.SOCK_STREAM)%0A        self.sock.connect(self.host)%0A%0A%0Aclass UnixStreamTransport(client.Transport, object):%0A    def __init__(self, socket_path: str) -%3E None:%0A        self.socket_path = socket_path%0A        super(UnixStreamTransport, self).__init__()%0A%0A    def make_connection(%0A        self, host: Union%5BTuple%5Bstr, Dict%5Bstr, str%5D%5D, str%5D%0A    ) -%3E UnixStreamHTTPConnection:%0A        return UnixStreamHTTPConnection(self.socket_path)%0A%0A%0Adef rpc() -%3E client.ServerProxy:%0A    return client.ServerProxy(%0A        %22http://localhost%22, transport=UnixStreamTransport(%22/var/run/supervisor.sock%22)%0A    )%0A

Add a supervisor package, to use the XMLRPC Supervisor API.