parsing dictionary to JSON
You don't pass a string to requests.post's data argument, you pass a dictionary. So basically, instead of converting your dictionary to a string, you just do:
requests.post(url, data=data)

[EDIT]: From my experience, it is better to leave requests take care of everything, instead of using requests.post(url, data=data), you can use requests.post(url, json=data), which will format the header correctly.
See here for the doc.