New Research: Supply Chain Attack on Axios Pulls Malicious Dependency from npm.Details →
Socket
Book a DemoSign in
Socket

rcurl

Package Overview
Dependencies
Maintainers
1
Versions
2
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

rcurl

Generate curl commands from python-requests

pipPyPI
Version
0.0.2
Maintainers
1

rcurl

A simple package of generating curl statements from requests.

For now the supported methods are limited. Checl the samples in usage

Installation

pip install rcurl

Usage

import json

import requests

from rcurl import get_curl

req_one = requests.get("https://google.com")
curl_command_one = get_curl(req_one)

req_two = requests.post("https://google.com")
curl_command_two = get_curl(req_two)

data = json.dumps({'a': 'b', 'x': 45})
headers = {
    'content-type': 'application/json',
    'authorization': 'Bearer dhsfdJGHGDH'
}
req_three = requests.post("https://google.com", data=data, headers=headers)
curl_command_three = get_curl(req_three)

print (curl_command_one)
print (curl_command_two)
print (curl_command_three)

Build

python setup.py bdist_wheel sdist
twine upload dist/*

FAQs

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts