Library to convert python requests object to curl command.
Project description
# Curlify - convert python requests request object to cURL command
## Installation
```sh
pip install curlify
```
## Changes
### v.1.2
* Order of headers is deterministic (thanks to @tomviner)
## Example
```py
import curlify
import requests
response = requests.get("http://google.ru")
print(curlify.to_curl(response.request))
# curl -X GET -H 'Connection: keep-alive' -H 'Accept-Encoding: gzip, deflate' -H 'Accept: */*' -H 'User-Agent: python-requests/2.7.0 CPython/2.7.11 Darwin/15.6.0' -d '' 'http://www.google.ru/'
```
## Installation
```sh
pip install curlify
```
## Changes
### v.1.2
* Order of headers is deterministic (thanks to @tomviner)
## Example
```py
import curlify
import requests
response = requests.get("http://google.ru")
print(curlify.to_curl(response.request))
# curl -X GET -H 'Connection: keep-alive' -H 'Accept-Encoding: gzip, deflate' -H 'Accept: */*' -H 'User-Agent: python-requests/2.7.0 CPython/2.7.11 Darwin/15.6.0' -d '' 'http://www.google.ru/'
```
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
curlify-1.2.1.tar.gz
(2.6 kB
view hashes)