Skip to main content
# curl_to_requests
curl_to_requests is a Python module that converts cURL commands into equivalent Python code using the requests library. Many cURL features are unsupported (it's a very complex piece of software), but curl_to_requests is far more complete than any of the other cURL converting utilities I've found.

Example:
```Python
from curl_to_requests import curl_to_requests

curl_cmd = '''curl 'https://github.com/mosesschwartz/curl_to_requests' \\
-H 'Accept-Encoding: gzip, deflate, sdch' \\
-H 'Accept-Language: en-US,en;q=0.8' \\
-H 'User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_10_4) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/43.0.2357.132 Safari/537.36' \\
-H 'Accept: text/html, */*; q=0.01' \\
-H 'Referer: https://github.com/mosesschwartz/curl_to_requests' \\
-H 'Connection: keep-alive' --compressed'''

print curl_to_requests.curl_to_requests(curl_cmd)
```

Metadata

Release files for curl_to_requests 1.0.1

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

Source distribution (sdist)

Source distribution for curl_to_requests 1.0.1
File Size Uploaded Provenance Actions
curl_to_requests-1.0.1.tar.gz 10.0 kB Without provenance Details for curl_to_requests-1.0.1.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for curl_to_requests 1.0.1
File Interpreter ABI Platform Actions
curl_to_requests-1.0.1-py2-none-any.whl Python 2 none any Details for curl_to_requests-1.0.1-py2-none-any.whl

Total release size: 21.2 kB

Release files / curl_to_requests-1.0.1.tar.gz

Download URL curl_to_requests-1.0.1.tar.gz
Size 10.0 kB
Tags Source
SHA-256 checksum
How to use checksums
df44f61689f9d91e33ec112b16358928150ca96ba39fe3c2d4adb13cb68c9032
BLAKE2b-256 checksum
How to use checksums
1bf5cd4bb6d475a94cd057c63e6000fdc0fdeebf2222d711ea4fd02da92b0fe3
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No

Release files / curl_to_requests-1.0.1-py2-none-any.whl

Download URL curl_to_requests-1.0.1-py2-none-any.whl
Size 11.2 kB
Tags Python 2
SHA-256 checksum
How to use checksums
9759c4a36a56ce28e69cbb75d492387ed283ffe9a6e0ca7a41e958e684e3ec57
BLAKE2b-256 checksum
How to use checksums
5d44ebe5865ebb44c45ec0e6e986248a84d5b03bfbd028455f3e5bfc7826870a
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No

Security for curl_to_requests 1.0.1

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.

Release history Release notifications | RSS feed

This release

1.0.1 This release

2 release files No provenance

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