py2curl

A tool render requests object to curl


Keywords
python, requests, curl
License
MIT
Install
pip install py2curl==1.0.9

Documentation

py2curl

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

安装

pip install py2curl

使用

import requests
import py2curl

req = requests.get('https://tendcode.com')
result = py2curl.render(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/