AR
arv-anshul/curler
Import curl command in python and use it with requests, httpx, etc. libraries.
curler
Import curl command in python and use it with requests, httpx, etc. libraries.
๐ Installation
Install curler package using pip command:
pip install -U curler๐งฉ Usage
import curler
command = """curl 'https://pypi.python.org/project/arv-easy-analysis' \
-H 'Accept-Encoding:gzip,deflate,sdch' \
-H 'Accept-Language:en-US,en;q=0.8'"""
curler.parse_curl(command)# Output:
ParsedCurl(
method="GET",
url="https://pypi.python.org/project/arv-easy-analysis",
params={},
data=None,
data_binary=None,
headers={
"Accept-Encoding": "gzip,deflate,sdch",
"Accept-Language": "en-US,en;q=0.8",
},
cookies={},
insecure=False,
user=(),
proxy={},
compressed=False,
include=False,
silent=False,
)๐งช You can also check package tests to gain more insights about this package.
๐ Acknowledgment
- ๐ค This package is heavily inspired by @spulec/uncurl.
On this page
Languages
Python84.9%Makefile15.1%
Contributors
MIT License
Created October 10, 2023
Updated August 30, 2024