Skip to main content

yet another library to convert request object to curl command

Project description

yet another library to convert request object to curl command

PyPI PyPI

Support request's objects from:

  • requests
  • httpx
  • aiohttp server
  • starlette/fastapi

Installation

pip install curlify3

Example

from curlify3 import to_curl
import requests

response = 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/

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page