Hopetree / py2curl

python requests to curl

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

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/

About

python requests to curl

License:MIT License


Languages

Language:Python 100.0%