import json, xmlrpc.client, zmq from .config.envvars import SUPERVISOR_HTTP_URI def create_source_code_response_data(filename, content, language): return { 'filename': filename, 'content': content, 'language': language } class SupervisorMixin: supervisor = xmlrpc.client.ServerProxy(SUPERVISOR_HTTP_URI).supervisor class ZMQConnectorBase: def __init__(self, zmq_context=None): self._zmq_context = zmq_context or zmq.Context.instance()