How to launch an python application from a browser?

I need to make my application open using a link in a browser on Windows/Linux/macOS. I know that in Windows I need to register my own URL Protocol for this. But again, I didn't find the sample code. For example I have .exe in my pc and user type in search myApp and my application opened (I need it so that after the payment the user returns back to the application, because the api that I use has a callbackUrl argument that is triggered after the payment). I would be grateful if you provide a cross-platform solution for this.

How many English words
do you know?
Test your English vocabulary size, and measure
how many words do you know
Online Test
Powered by Examplum