Skip to main content

将请求对象转换为curl命令字符串

Project description

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

安装

pip install py3curl

使用

import requests
import py3curl

req = requests.get('https://tendcode.com')
result = py3curl.request_to_curl(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.

Source Distribution

py3curl-1.1.2.tar.gz (2.2 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

py3curl-1.1.2-py3-none-any.whl (2.4 kB view details)

Uploaded Python 3

File details

Details for the file py3curl-1.1.2.tar.gz.

File metadata

  • Download URL: py3curl-1.1.2.tar.gz
  • Upload date:
  • Size: 2.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.10.4

File hashes

Hashes for py3curl-1.1.2.tar.gz
Algorithm Hash digest
SHA256 8c2ca2497740e4f36eaafdbf1dceff2ef753860cdecb345f50853f0a91fa8f2d
MD5 5b799c2653051eb11e1803c8168aee27
BLAKE2b-256 44e19d0a8e1dc6340a7ba95c668623a4654494aa624fa5ad9f7f08314a155bdf

See more details on using hashes here.

File details

Details for the file py3curl-1.1.2-py3-none-any.whl.

File metadata

  • Download URL: py3curl-1.1.2-py3-none-any.whl
  • Upload date:
  • Size: 2.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.10.4

File hashes

Hashes for py3curl-1.1.2-py3-none-any.whl
Algorithm Hash digest
SHA256 4de78b8e3c8dadb0ad1a1216c5488a69c0cc1c143dbc0e6417081122053b45c9
MD5 f2904d97103e288fe45d180fc2d4df5c
BLAKE2b-256 abd4944e99e854a508736d6bbd2d6b63c256141b1d1e2f912daa19e2d0817b88

See more details on using hashes here.

Supported by

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