Image – How to draw a rectangle with some text using python

I want to draw an image using python3. I have implemented the same in the Android application using Java. Looking for something to do in the web application. You can see at the bottom of the image where I used paint on android.

My image is:

Sample Image

I am not getting any library or code snippet to do it in Python. Any suggestions will be helpful. Thank you