The object to be passed to Python via an AJAX call is:
data = {'Dim 1':'Value 1','Dim 2':'Value 2'}
NOTE: python in conjuction with flask may sound like a better option!
Kindly read on that as well.