Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/hopetree/py2curl

python requests to curl
https://github.com/hopetree/py2curl

Last synced: 24 days ago
JSON representation

python requests to curl

Awesome Lists containing this project

README

        

# py2curl

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

## 安装

```bash
pip install py2curl
```

## 使用

```python
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/
```