将请求对象转换为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.3.tar.gz
(2.1 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.3.tar.gz.
File metadata
- Download URL: py3curl-1.1.3.tar.gz
- Upload date:
- Size: 2.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.10.4
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
ee36075785ddc0dd8f8f597d9c94f2b63de109602631648be81372fd803f47c7
|
|
| MD5 |
347d4ad172379050b557b857cb51ebde
|
|
| BLAKE2b-256 |
ca69616eba9a0a21c2e7c1685a24c700def38e37f14cf5eff9fe007495eecc3c
|
File details
Details for the file py3curl-1.1.3-py3-none-any.whl.
File metadata
- Download URL: py3curl-1.1.3-py3-none-any.whl
- Upload date:
- Size: 2.1 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 |
2edc48385791e962817399075811f87aa4ec5a0d753eeb04eed4aa9787aba077
|
|
| MD5 |
cd588ec4d3d52ba34248cde99ce808df
|
|
| BLAKE2b-256 |
3c7fbcf1445dd43d06e4fd774abf8205e8f89d723a9abdb75c0c98e25a0e6ce4
|