arv-anshul / curler

Import curl command in python and use it with requests, httpx, etc. libraries.

Home Page:https://pypi.org/p/curler

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

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

About

Import curl command in python and use it with requests, httpx, etc. libraries.

https://pypi.org/p/curler

License:MIT License


Languages

Language:Python 84.9%Language:Makefile 15.1%