Import curl command in python and use it with requests, httpx, etc. libraries.
Project description
curler
Import curl command in python and use it with requests, httpx, etc. libraries.
🎉 Installation
Install curler using pip
command:
pip install curler
🧩 Usage
from curler import curl_command_parser
curl = """curl 'https://pypi.python.org/project/arv-easy-analysis' \
-H 'Accept-Encoding:gzip,deflate,sdch' \
-H 'Accept-Language:en-US,en;q=0.8'"""
curl_command_parser(curl)
# 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.
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
curler-0.0.2.tar.gz
(4.6 kB
view hashes)
Built Distribution
curler-0.0.2-py3-none-any.whl
(5.2 kB
view hashes)