NodeRED and python

output to tcp/udp port and listen for the port in NR
or write to a file and read the file in NR ?