(self, data: Union[str, bytes])
| 81 | return msg.encode() |
| 82 | |
| 83 | def deserialize_message(self, data: Union[str, bytes]) -> ParsedMessagePayload: |
| 84 | obj = json.loads(data) |
| 85 | |
| 86 | if "DEBUGP" in os.environ: # pragma: no cover |
| 87 | print("\x1b[33mRECV>\x1b[0m", json.dumps(obj, indent=2)) |
| 88 | return obj |
| 89 | |
| 90 | |
| 91 | class PipeTransport(Transport): |