将请求对象转换为curl命令字符串
Project description
将 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/
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
py3curl-1.1.0.tar.gz
(2.2 kB
view details)
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file py3curl-1.1.0.tar.gz.
File metadata
- Download URL: py3curl-1.1.0.tar.gz
- Upload date:
- Size: 2.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.10.4
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
1cd97cd3ac2c4d7d62b6a000eada1497414d6b61819fbf20139026a4062b0043
|
|
| MD5 |
4f08ed41d1fb8c3d68a74451d45688d6
|
|
| BLAKE2b-256 |
3e0acc3a03deb72a36c49eb3fe475a84090c9c72fe30276e8d89ecbd23eb126c
|
File details
Details for the file py3curl-1.1.0-py3-none-any.whl.
File metadata
- Download URL: py3curl-1.1.0-py3-none-any.whl
- Upload date:
- Size: 2.4 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.10.4
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
ef61861c691471f9e8b444e7f65b9f9ac92fa21ab35e28537e43b4cd7ca97e0b
|
|
| MD5 |
8d69010066f951995c7e4d392fd35275
|
|
| BLAKE2b-256 |
66ef49219989a8b52697e09e5b30640896634983433034bfd644f05b6898ac36
|