# uncurl **Repository Path**: mirrors_Inndy/uncurl ## Basic Information - **Project Name**: uncurl - **Description**: A library to convert curl requests to python-requests. - **Primary Language**: Unknown - **License**: Apache-2.0 - **Default Branch**: master - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 0 - **Forks**: 0 - **Created**: 2020-08-08 - **Last Updated**: 2026-03-07 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README # Uncurl - Converting curl requests to python-requests [![Build Status](https://travis-ci.org/spulec/uncurl.png?branch=master)](https://travis-ci.org/spulec/uncurl) # In a nutshell Uncurl is a library that allows you to convert curl requests into python code that uses [Requests](github.com/kennethreitz/requests). ## Example ```bash $ uncurl "curl 'https://pypi.python.org/pypi/uncurl' -H 'Accept-Encoding: gzip,deflate,sdch' -H 'Accept-Language: en-US,en;q=0.8' -H 'User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_8_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/33.0.1750.152 Safari/537.36' -H 'Accept: text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,*/*;q=0.8' -H 'Cache-Control: max-age=0' -H 'Cookie: foo=bar;' -H 'Connection: keep-alive' --compressed" requests.get("https://pypi.python.org/pypi/uncurl", headers={ "Accept-Encoding": "gzip,deflate,sdch", "Accept-Language": "en-US,en;q=0.8", "User-Agent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_8_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/33.0.1750.152 Safari/537.36", "Accept": "text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,*/*;q=0.8", "Cache-Control": "max-age=0", "Connection": "keep-alive", }, cookies={ "foo": "bar", }) ``` The unerlying API: ```python import uncurl print uncurl.parse("curl 'https://pypi.python.org/pypi/uncurl' -H 'Accept-Encoding: gzip,deflate,sdch'") ``` prints the string ```bash 'requests.get("https://pypi.python.org/pypi/uncurl", headers={ "Accept-Encoding": "gzip,deflate,sdch", })' ``` ## Install ```console $ pip install uncurl ```