py3curl

将请求对象转换为curl命令字符串


License
Apache-2.0
Install
pip install py3curl==1.1.3

Documentation

将 python 的 requests 代码转换成 curl 命令

安装

pip install py3curl

使用

import requests
import py3curl

req = requests.get('https://tendcode.com')
result = py3curl.request_to_curl(req.request)
print(result)
### curl -k -v -X GET -H "Accept: */*" -H "Accept-Encoding: gzip, deflate" -H "Connection: keep-alive" -H "User-Agent: python-requests/2.19.1" https://tendcode.com/