For whoever encounters the same problem, I found a partial solution.
The bidi package provides this functionality, so using:
from bidi import algorithm as bidialg
import matplotlib.pyplot as plt
text = bidialg.get_display(u'שלום כיתה א')
plt.text(0.5, 0.5, text , name = 'Arial')
plt.show()
displays it correctly.
So why is it partial? Because I found out that the bidi package sometimes messes up latex expression which I use with matplotlib. So use it carefully.