将请求对象转换为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.1.tar.gz
(1.6 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.1.tar.gz.
File metadata
- Download URL: py3curl-1.1.1.tar.gz
- Upload date:
- Size: 1.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.10.4
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
27a7ff35aa352fc6e4459a481c6548d13977f4a6a388d1918249eae7a2e02dde
|
|
| MD5 |
cde47e2d5196801c133bca83b8cf2e8e
|
|
| BLAKE2b-256 |
84fb4f0f2e2d63d02acc6f2b881ce7c67d87ded12be1a7316e049b54ab491353
|
File details
Details for the file py3curl-1.1.1-py3-none-any.whl.
File metadata
- Download URL: py3curl-1.1.1-py3-none-any.whl
- Upload date:
- Size: 1.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 |
01cca2d9b2e851b2386412ffb91fdead3fa0e72d62bfa744aa4bde6b2907bc24
|
|
| MD5 |
4592418128f770deab8123283cd62398
|
|
| BLAKE2b-256 |
4331dac376f38635e6c27fbcad2fb4829a570c29c93cf3aadbcc5fdb7087d5b2
|