A tool render requests object to curl
Project description
py2curl
将 python 的 requests 代码转换成 curl 命令
安装
pip install py2curl
使用
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/
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
py2curl-1.0.9.tar.gz
(2.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 py2curl-1.0.9.tar.gz.
File metadata
- Download URL: py2curl-1.0.9.tar.gz
- Upload date:
- Size: 2.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.2.0 pkginfo/1.5.0.1 requests/2.24.0 setuptools/47.1.0 requests-toolbelt/0.9.1 tqdm/4.49.0 CPython/3.8.5
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
309b2531dcf6e901314ae2da42104ec9ffcf411201532087859bfcde2ee76d32
|
|
| MD5 |
93225f2328058a6d4a0efe099225b439
|
|
| BLAKE2b-256 |
942f3adf354b56a2c6bc94714465ca26dabff5a936410db171c210d29277755b
|
File details
Details for the file py2curl-1.0.9-py3-none-any.whl.
File metadata
- Download URL: py2curl-1.0.9-py3-none-any.whl
- Upload date:
- Size: 2.7 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.2.0 pkginfo/1.5.0.1 requests/2.24.0 setuptools/47.1.0 requests-toolbelt/0.9.1 tqdm/4.49.0 CPython/3.8.5
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
b92b72b0d4b994caffcce4da65e1feeb29493856fca375662b65e98991fa2cf8
|
|
| MD5 |
7dbe6a0140ebb572703ea2d0ad2f5fe3
|
|
| BLAKE2b-256 |
a539a8b9e44689b560ab014ed9824085a20f36988a82edb2736a7960db8bca21
|