mirror of
https://github.com/avatao-content/baseimage-tutorial-framework
synced 2024-11-05 15:31:21 +00:00
21 lines
490 B
Python
21 lines
490 B
Python
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()
|