curlifier
Converts the Request and PreparedRequest objects of the Requests library into an executable curl command.
Security
The resulting curl command will include all authentication credentials, API keys, passwords, and other sensitive information that were part of the original request. Be careful when sharing or logging these commands, as they may expose sensitive data.
Installation
pip install curlifier
Usage
All you need is to import curlify.
For example:
>>> import requests
>>> from curlifier import curlify
>>> body = {'id': 1, 'name': 'Tima', 'age': 28}
>>> r = requests.post('https://httpbin.org/', json=body)
>>> curlify(r)
curl --request POST 'https://httpbin.org/' <...> --header 'Content-Type: application/json' --data '{"id": 1, "name": "Tima", "age": 28}'
If you use PreparedRequest, you can also specify it instead of the Response object:
>>> req = requests.Request('POST', 'https://httpbin.org/')
>>> r = req.prepare()
>>> curlify(prepared_request=r)
curl --request POST 'https://httpbin.org/'
If you want a short version of the curl command, you can specify it:
>>> body = {'id': 1, 'name': 'Tima', 'age': 28}
>>> r = requests.post('https://httpbin.org/', json=body)
>>> curlify(r, shorted=True)
curl -X POST 'https://httpbin.org/' <...> -H 'Content-Type: application/json' -d '{"id": 1, "name": "Tima", "age": 28}'
You can also specify the configuration when forming the curl command:
>>> curlify(r, location=True, insecure=True)
curl --request POST 'https://httpbin.org/' <...> --header 'Content-Type: application/json' --data '{"id": 1, "name": "Tima", "age": 28}' --location --insecure
- location (bool) - Follow redirects (default: False)
- verbose (bool) - Verbose output (default: False)
- silent (bool) - Silent mode (default: False)
- insecure (bool) - Allow insecure connections (default: False)
- include (bool) - Include protocol headers (default: False)
License
Curlifier is released under the MIT License. See the bundled LICENSE file for details.
The logo was created using Font Meme.
Metadata
Release files for curlifier 1.0.8
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 |
|---|---|---|---|---|
| curlifier-1.0.8.tar.gz | 9.4 kB | Without provenance | Details for curlifier-1.0.8.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| curlifier-1.0.8-py3-none-any.whl | Python 3 | none | any | Details for curlifier-1.0.8-py3-none-any.whl |
Total release size: 22.1 kB
Release files / curlifier-1.0.8.tar.gz
| Download URL | curlifier-1.0.8.tar.gz |
|---|---|
| Size | 9.4 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
a760159c8f1e7720146dbd1c0f499ceab898034fcc3787cc0f1499fb3011e63d
|
|
BLAKE2b-256 checksum How to use checksums |
5a52f546ebc5f9c4e2cbf87034114d3a931a4eef9390db297cac46c06aa1d1b7
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
poetry/2.4.0 CPython/3.14.3 Darwin/25.6.0
|
Release files / curlifier-1.0.8-py3-none-any.whl
| Download URL | curlifier-1.0.8-py3-none-any.whl |
|---|---|
| Size | 12.7 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
26478f4a1d8b5cc67558c34be460759c05bbd5013b9c1891c62ed1a774b16cd2
|
|
BLAKE2b-256 checksum How to use checksums |
026495c50795b9d8853801e3434a84851130da4b1a186bfaab3b940f42c0938f
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
poetry/2.4.0 CPython/3.14.3 Darwin/25.6.0
|
Security for curlifier 1.0.8
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.