Skip to main content

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/

Metadata

Release files for py2curl 1.0.9

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for py2curl 1.0.9
File Size Uploaded Provenance Actions
py2curl-1.0.9.tar.gz 2.6 kB Without provenance Details for py2curl-1.0.9.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for py2curl 1.0.9
File Interpreter ABI Platform Actions
py2curl-1.0.9-py3-none-any.whl Python 3 none any Details for py2curl-1.0.9-py3-none-any.whl

Total release size: 5.4 kB

Release files / py2curl-1.0.9.tar.gz

Download URL py2curl-1.0.9.tar.gz
Size 2.6 kB
Tags Source
SHA-256 checksum
How to use checksums
309b2531dcf6e901314ae2da42104ec9ffcf411201532087859bfcde2ee76d32
BLAKE2b-256 checksum
How to use checksums
942f3adf354b56a2c6bc94714465ca26dabff5a936410db171c210d29277755b
Upload date
Uploaded using Trusted Publishing?
What is 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

Release files / py2curl-1.0.9-py3-none-any.whl

Download URL py2curl-1.0.9-py3-none-any.whl
Size 2.7 kB
Tags Python 3
SHA-256 checksum
How to use checksums
b92b72b0d4b994caffcce4da65e1feeb29493856fca375662b65e98991fa2cf8
BLAKE2b-256 checksum
How to use checksums
a539a8b9e44689b560ab014ed9824085a20f36988a82edb2736a7960db8bca21
Upload date
Uploaded using Trusted Publishing?
What is 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

Security for py2curl 1.0.9

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page