Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
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
- Host: GitHub
- URL: https://github.com/hopetree/py2curl
- Owner: Hopetree
- License: mit
- Created: 2020-09-18T07:01:23.000Z (about 4 years ago)
- Default Branch: master
- Last Pushed: 2020-09-22T06:20:08.000Z (about 4 years ago)
- Last Synced: 2024-10-14T02:01:19.523Z (24 days ago)
- Language: Python
- Size: 10.7 KB
- Stars: 3
- Watchers: 2
- Forks: 1
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# py2curl
将 python 的 requests 代码转换成 curl 命令
## 安装
```bash
pip install py2curl
```## 使用
```python
import requests
import py2curlreq = 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/
```