curlify
Convert Requests request objects to curl commands.
What it is and what it does
Curlify takes a requests request object and generates the equivalent cURL command as a string. It's a debugging and documentation tool: when you've built an HTTP request in Python using requests, you can see exactly what cURL command would reproduce it, which is useful for sharing reproducible examples, testing in shell environments, or understanding what your code is actually sending over the wire.
The package handles the conversion of headers, request method, body, query parameters, and SSL verification settings. It supports options like pretty-printing multi-line commands and adding the --compressed flag. With only requests as a runtime dependency and a pure-Python wheel, it installs quickly and has minimal overhead.
Use it for:
- Debug a requests call by viewing its cURL equivalent to understand what's being sent.
- Share reproducible HTTP request examples with teammates or in bug reports as shell commands.
- Test an HTTP endpoint in curl before implementing it in Python code.
- Log requests in cURL format for audit trails or integration documentation.
- Convert Python-based API client calls into shell scripts for automation.
Worth the install?
AI-flagged interpretation of the facts on this page — verify before relying
Converts a Python requests request object into an equivalent cURL command string, useful for debugging, documentation, or reproducing HTTP requests outside Python.
Yes, if you regularly debug or document HTTP requests made with requests. The package is lightweight, has no known vulnerabilities, and solves a specific debugging need well. The aging maintenance status (446 days since last release) is not a blocker for a stable, narrow-scope tool, but check whether it handles your specific requests features before relying on it for critical workflows.
Install
curlify on PyPI
pip
pip install curlifyuv
uv add curlifypoetry
poetry add curlifyInstalling curlify
Before you install
Low friction installation with a single lightweight dependency (requests). Last release was 446 days ago; the repository is active and not archived, though the package is aging and may see infrequent updates.
License in practice
MIT License (permissive) — you can use, modify, and distribute this package freely in commercial or private projects with minimal restrictions.
Quickstart
import curlify
import requests
response = requests.get("http://example.com")
print(curlify.to_curl(response.request))
# Output: curl -X 'GET' -H 'Accept: */*' ... 'http://example.com/'
Requires Python 3.7 or later; Python 2 support was removed in v3.0.0.
Verify before relying
- Whether the package handles all modern requests features (e.g., proxies, auth handlers, custom adapters).
- Performance or correctness with very large request bodies or headers.
Package facts
| License | MIT License (permissive) |
| Python support | supports the current Python release (>=3.7) |
| Install friction | low — pure-Python wheel |
| Runtime dependencies | 1 — requests |
| Maintenance | aging — 446 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 10,173,871/month — #1,474 on PyPI (30-day window, as of 2026-08-14) |
| Known vulnerabilities | none known (OSV.dev, checked 2026-08-14) |
Evidence: curlify-3.0.0-py3-none-any.whl
Tags
More WWW/HTTP packages
urllib3 is an HTTP client library that provides…
permissive · top 100 on PyPI
requestsRequests is a Python HTTP library that…
permissive · top 100 on PyPI
h11h11 is a pure-Python HTTP/1.1 protocol…
permissive · top 100 on PyPI
httpxHTTPX is a fully featured HTTP client library…
permissive · top 100 on PyPI
httpcoreA minimal low-level HTTP client library that…
permissive · top 100 on PyPI
aiohttpaiohttp is an async HTTP client and server…
permissive · top 100 on PyPI
curlify2Converts Python requests and httpx HTTP request…
permissive · top 15,000 on PyPI
uncurlConverts curl command-line requests into…
unclear · top 15,000 on PyPI
requests-toolbeltProvides utilities for the requests library,…
permissive · top 1,000 on PyPI
fake-headersGenerates realistic User-Agent strings and HTTP…
permissive · top 15,000 on PyPI
tls-clientAn HTTP client library that mimics the requests…
permissive · top 5,000 on PyPI
wrapper-tls-requestsMakes HTTP requests with browser-like TLS…
permissive · top 15,000 on PyPI
requests-auth-aws-sigv4Adds AWS Signature Version 4 authentication to…
permissive · top 5,000 on PyPI
Flask-ScriptFlask-Script provides command-line interface…
permissive · top 15,000 on PyPI
httpieHTTPie is a command-line HTTP client that makes…
permissive · top 5,000 on PyPI