$ pip install curlify
...
import curlify
print(curlify.to_curl(r.request)) # r is the response object from the requests library.
$ pip install curlify
...
import curlify
print(curlify.to_curl(r.request)) # r is the response object from the requests library.