Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/arv-anshul/curler
Import curl command in python and use it with requests, httpx, etc. libraries.
https://github.com/arv-anshul/curler
curl curler parser project pycurl pypi pypi-package python3
Last synced: 6 days ago
JSON representation
Import curl command in python and use it with requests, httpx, etc. libraries.
- Host: GitHub
- URL: https://github.com/arv-anshul/curler
- Owner: arv-anshul
- License: mit
- Created: 2023-10-10T11:37:41.000Z (about 1 year ago)
- Default Branch: main
- Last Pushed: 2024-01-18T08:43:59.000Z (12 months ago)
- Last Synced: 2024-12-14T13:20:14.819Z (18 days ago)
- Topics: curl, curler, parser, project, pycurl, pypi, pypi-package, python3
- Language: Python
- Homepage: https://pypi.org/p/curler
- Size: 31.3 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# curler
Import curl command in python and use it with requests, httpx, etc. libraries.
## ๐ Installation
Install **curler** package using `pip` command:
```sh
pip install -U curler
```## ๐งฉ Usage
```python
import curlercommand = """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)
``````python
# 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](./tests/) to gain more insights about this package.
## ๐ Acknowledgment
- ๐ค This package is heavily inspired by [@spulec/uncurl](https://github.com/spulec/uncurl).