related.attach(document)
body = related.as_string().split('\n\n', 1)[1]
headers = dict(list(related.items()))
r = requests.post(url, data=body, headers=headers)
How to send a “multipart/related” with requests in python?