As of plotly version 4.12, you can add Horizontal and Vertical Lines and Rectangles. I have installed plotly 4.12. I am using the following snippet:
import plotly