Curlify is a Python library that converts `requests` request objects into equivalent cURL commands. This is particularly useful for debugging network requests by quickly generating a cURL command that can be executed directly in a terminal. The current version is 3.0.0, and it maintains an active release cadence, primarily focusing on Python version compatibility and minor enhancements.
pip install curlifyVerified import paths — ran on the pinned version, not inferred.
This quickstart demonstrates how to create a `requests.Request` object, prepare it using `.prepare()`, and then convert the resulting `PreparedRequest` object into a cURL command string using `curlify`.
Upgrade Python to 3.7 or newer, or pin `curlify` to a version less than 3.0.0 (e.g., `pip install 'curlify<3.0.0'`).
Always call the `.prepare()` method on your `requests.Request` object before passing it to `curlify`. For example: `prepared_req = requests.Request(...).prepare()` then `curlify(prepared_req)`.
Update your import statement from `from curlify import curlify` to `from curlify import to_curl`, and then use `to_curl(...)` instead of `curlify(...)`.
Update your import statement from `from curlify import curlify` to `from curlify.curlify import curlify`.