"Rosbridge server creates a WebSocket connection and passes any JSON messages from the WebSocket to rosbridge_library, so rosbridge library can convert the JSON strings into ROS calls..." (to read more, see the rosbridge_server documentation)
"Python ROS Bridge library allows to use Python and IronPython to interact with ROS, the open-source robotic middleware. It uses WebSockets to connect to rosbridge 2.0 and provides publishing, subscribing, service calls, actionlib, TF, and other essential ROS functionality..." (to read more, see the roslibpy documentation)
to install rosbridge_server and roslibpy:
sudo apt install ros-noetic-rosbridge-server
pip install roslibpy
a json file with the format shown below where