RequestsToCurl
Convert python requests object to cURL command.
This repository is improved based on curlify. Since curlify does not seem to be updated anymore, no one responded to the PR I provided, so this repository was created.
Installation
pip install requests_to_curl
Usage
>>> import curl
>>> import requests
>>>
>>> response = requests.get("https://lulaolu.com")
>>>
>>> curl.parse(response) # stdout
curl -X GET -H 'Accept: */*' -H 'Accept-Encoding: gzip, deflate' -H 'Connection: keep-alive' -H 'User-Agent: python-requests/2.27.1' https://lulaolu.com:443/
If you want to get the curl string in the code project, use return_it
>>> c = curl.parse(response, return_it=True)
>>> print(c)
If you want to hide stdout, use print_it=False
>>> c = curl.parse(response, print_it=False)
You can also use r2c or requests_to_curl instead of curl
>>> import r2c
>>> r2c.parse(response) # ok!
>>>
>>> import requests_to_curl
>>> requests_to_curl.parse(response) # ok!
Metadata
Release files for requests-to-curl 1.1.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| requests_to_curl-1.1.0.tar.gz | 5.2 kB | Without provenance | Details for requests_to_curl-1.1.0.tar.gz |
Release files / requests_to_curl-1.1.0.tar.gz
| Download URL | requests_to_curl-1.1.0.tar.gz |
|---|---|
| Size | 5.2 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
04e5ebeec91b36c0517a2ef418c33620d835ebabd8b3f08bd617b0d0a9efcd50
|
|
BLAKE2b-256 checksum How to use checksums |
cff43f6e6e87cf2de47bcddab1859378f6452cff98ec2a21ae0348300677aae4
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.0 CPython/3.9.6
|
Security for requests-to-curl 1.1.0
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.