Implement live ticker widget with python api on website

I am a beginner in this field and I need a recommendation. I have a website and I want to implement a box/widget which is connected to a python script and prints out an HTML text immediately which is triggered and build by the python program. Something like a "live ticker". Have you any advises on how I can implement that? Thanks a lot!