Skip to main content

A tool render requests object to curl

Project description

py2curl

将 python 的 requests 代码转换成 curl 命令

安装

pip install py2curl

使用

import requests
import py2curl

req = requests.get('https://tendcode.com')
result = py2curl.render(req.request)
print(result)
### curl -k -v -X GET -H "Accept: */*" -H "Accept-Encoding: gzip, deflate" -H "Connection: keep-alive" -H "User-Agent: python-requests/2.19.1" https://tendcode.com/

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Files for py2curl, version 1.0.9
Filename, size File type Python version Upload date Hashes
Filename, size py2curl-1.0.9-py3-none-any.whl (2.7 kB) File type Wheel Python version py3 Upload date Hashes View
Filename, size py2curl-1.0.9.tar.gz (2.6 kB) File type Source Python version None Upload date Hashes View

Supported by

AWS AWS Cloud computing Datadog Datadog Monitoring DigiCert DigiCert EV certificate Facebook / Instagram Facebook / Instagram PSF Sponsor Fastly Fastly CDN Google Google Object Storage and Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Salesforce Salesforce PSF Sponsor Sentry Sentry Error logging StatusPage StatusPage Status page