skillfed

curlify

Convert Requests request objects to curl commands.

curlify v3.0.0 10.2M downloads/30d#1,474 on PyPI449
Permissive license MIT License AGING released

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 curlify

uv

uv add curlify

poetry

poetry add curlify

Installing 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

Environment :: Web EnvironmentIntended Audience :: DevelopersLicense :: OSI Approved :: MIT LicenseOperating System :: OS IndependentProgramming Language :: PythonProgramming Language :: Python :: 3Programming Language :: Python :: 3 :: OnlyTopic :: Internet :: WWW/HTTPTopic :: Internet :: WWW/HTTP :: Dynamic Content

Tags

requests to curl conversionconvert http request to curldebug requests as curl commandsexport requests to shellcurl command generatorhttp request debuggingrequests inspection tool
debugginghttp-toolsrequests-utilities

More WWW/HTTP packages