conn = httplib.HTTPConnection('example.com:80')
conn.request('POST', '/some/path/to/site', params, headers)
response = conn.getresponse()
print(response.status, response.reason)
Convert a curl POST request to Python only using standard library