How to send python command from maya to UE5(via it's remote execution api)

I want to send a python script from maya to UE5. Need help with how to configure the sender script to connect to UE5.
the reason I need to send the python script directly from maya to UE5 rather than run the script directly in UE5 is I need to pass multiple variables to the script for each asset I’m processing in maya(also a python script), and to run the UE5 script directly in UE5 without communicating with maya would mean I need to hard code the different variables for each asset’s’ import and build process in the UE5 script. to do that would defy the purpose of automation with python.

Here is how far I got, trying to set up the sender script and connect to UE5, to send a simple print(‘hello world’)

import socket

def main():
    MCAST_GRP = '239.0.0.1'
    MCAST_PORT = 6766
    sock = socket.socket(socket.AF_INET, socket.SOCK_DGRAM, socket.IPPROTO_UDP)
    sock.setsockopt(socket.IPPROTO_IP, socket.IP_MULTICAST_TTL, 32)
    sock.sendto(b"print('hellow world!')", (MCAST_GRP, MCAST_PORT))

if __name__ == '__main__':
    main()

here is the UE5 python remote execution api setting:
Screenshot 2023-09-05 113106

when I run this script in maya, I got an error in UE5:
LogPythonRemoteExecution: Error: Failed to read remote execution message ‘print(‘hellow world!’)’: Failed to deserialize json object! Invalid Json Token. Line: 1 Ch: 1

document or discussion on this is scaringly little, if someone can help with this I will be extremely grateful!!