Пример #1
0
    def __init__(self, conn):
        super().__init__(conn)

        receiver_details = ReceiverDetails()

        def send_receiver_info(*args):
            receiver_info = receiver_details.__dict__()
            self.write_receiver_details(receiver_info)

        self._detailsSubscription = receiver_details.wire(send_receiver_info)
        send_receiver_info()
Пример #2
0
 def header_variables(self):
     variables = {"document_root": self.get_document_root()}
     variables.update(ReceiverDetails().__dict__())
     return variables
Пример #3
0
 def receiverDetails(self):
     receiver_details = ReceiverDetails()
     data = json.dumps(receiver_details.__dict__())
     self.send_response(data, content_type="application/json")