cURL to Python