The requests library is used to send HTTP requests, which the command provided by @Zhenya Kovalyov is not. Here's one example of how it can be executed from Python. This example requires Python 3.5 or higher. In earlier versions of Python you can use os.system() to execute the shell command.
import subprocess subprocess.run(["start","rm://firstname.lastname@example.org/?message=hello"],shell=True)
@cyril.godart unfortunately we do not have an API for the Messenger. The only bit that you can do is to open a messenger window and fill in the text of the message with a RACE link:
In Windows press Win + R for 'Run', paste the following link and press Enter -