Skip to main content

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/*

Metadata

Release files for rcurl 0.0.2

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for rcurl 0.0.2
File Size Uploaded
rcurl-0.0.2.tar.gz 1.8 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for rcurl 0.0.2
File Interpreter ABI Platform
rcurl-0.0.2-py3-none-any.whl Python 3 none any Details

Total release size: 3.7 kB

Release files / rcurl-0.0.2.tar.gz

Download URL rcurl-0.0.2.tar.gz
Size 1.8 kB
Tags Source
SHA-256 checksum
How to use checksums
a0f7fac4cb8e49739a2951833a7fbb8f0be2d808f24029eafad35cfd184c6a53
BLAKE2b-256 checksum
How to use checksums
f133dc8d3c943b6eee64248c1d72a3e5daa7a51f9d18aa6291bd01830179b377
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/1.13.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/41.0.1 requests-toolbelt/0.9.1 tqdm/4.32.1 CPython/3.6.8

Release files / rcurl-0.0.2-py3-none-any.whl

Download URL rcurl-0.0.2-py3-none-any.whl
Size 2.0 kB
Tags Python 3
SHA-256 checksum
How to use checksums
680674833438e24295630c5310cc5aa6ba202299f2fb33bf8ae86fb6f3de81f9
BLAKE2b-256 checksum
How to use checksums
7ec7f9f070a787c8af6eb7d35e5ba56c0cc60ed6c219fc4bc6237e292e2c8faf
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/1.13.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/41.0.1 requests-toolbelt/0.9.1 tqdm/4.32.1 CPython/3.6.8

Release history Release notifications | RSS feed

This release

0.0.2 This release

2 release files

0.0.1

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page