Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/shpaker/curlify3
https://github.com/shpaker/curlify3
Last synced: about 2 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/shpaker/curlify3
- Owner: shpaker
- Created: 2024-11-02T15:58:58.000Z (2 months ago)
- Default Branch: main
- Last Pushed: 2024-11-07T17:40:59.000Z (about 2 months ago)
- Last Synced: 2024-11-07T18:31:21.155Z (about 2 months ago)
- Language: Python
- Size: 23.4 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
[![PyPI](https://img.shields.io/pypi/v/curlify3.svg)](https://pypi.python.org/pypi/curlify3)
[![PyPI](https://img.shields.io/pypi/dm/curlify3.svg)](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/
```