call the as_bytes method on the return value of the message.message method append to it '\n' character, use it as the argument for the call to the self.stream.write method.
self . stream . write ( message . message ( ) . as_bytes ( ) + b'\n' )