https://github.com/shpaker/curlify3
yet another library to convert request object to curl command
https://github.com/shpaker/curlify3
Last synced: 6 months ago
JSON representation
yet another library to convert request object to curl command
- Host: GitHub
- URL: https://github.com/shpaker/curlify3
- Owner: shpaker
- Created: 2024-11-02T15:58:58.000Z (8 months ago)
- Default Branch: main
- Last Pushed: 2024-11-08T17:34:56.000Z (8 months ago)
- Last Synced: 2025-01-08T11:23:39.084Z (6 months ago)
- Language: Python
- Homepage:
- Size: 81.1 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# yet another library to convert request object to curl command
[](https://pypi.python.org/pypi/curlify3)
[](https://pypi.python.org/pypi/curlify3)### Support request's objects from:
- requests
- httpx
- aiohttp server
- starlette/fastapi## Installation
```sh
pip install curlify3
```## Example
```py
from curlify3 import to_curl
import requestsresponse = requests.get("http://google.ru")
print(to_curl(response.request))
# curl -H 'user-agent: python-requests/2.32.3' -H 'accept-encoding: gzip, deflate' -H 'accept: */*' -H 'connection: keep-alive' http://www.google.ru/
```