Converts curl statements to python using command line
Project description
# curltopy
Converts curl statements from Chrome's DevTools or Firefox's Tools to executable python 2 and 3 compatible code.
I was inspired to write a command line version after seeing @NickCarneiro's web app on [curl.trillworks.com](http://curl.trillworks.com/).
## Install
pip install curltopy
## Usage
1. Open Chrome's DevTools or Firefox's Tools
2. Click on the Network tab
3. Navigate to a website
4. Right click on a call and click _Copy > Copy as cURL_
5. Here is a template. Replace the curl statement with the one captured from the browser.
curltopy 'curl "http://example.com" -H "Pragma: no-cache"' > runme.py
chmod +x runme.py
./runme.py
Converts curl statements from Chrome's DevTools or Firefox's Tools to executable python 2 and 3 compatible code.
I was inspired to write a command line version after seeing @NickCarneiro's web app on [curl.trillworks.com](http://curl.trillworks.com/).
## Install
pip install curltopy
## Usage
1. Open Chrome's DevTools or Firefox's Tools
2. Click on the Network tab
3. Navigate to a website
4. Right click on a call and click _Copy > Copy as cURL_
5. Here is a template. Replace the curl statement with the one captured from the browser.
curltopy 'curl "http://example.com" -H "Pragma: no-cache"' > runme.py
chmod +x runme.py
./runme.py
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
curltopy-0.1.2.tar.gz
(3.4 kB
view details)
Built Distribution
File details
Details for the file curltopy-0.1.2.tar.gz
.
File metadata
- Download URL: curltopy-0.1.2.tar.gz
- Upload date:
- Size: 3.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/1.12.1 pkginfo/1.4.2 requests/2.21.0 setuptools/40.6.3 requests-toolbelt/0.8.0 tqdm/4.28.1 CPython/3.7.1
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 4b3c76ae4404641bfc61ecfac42cce22988dac42c31c0e7261aab41486fca808 |
|
MD5 | 02654c411c18f5ce6d922b5c722eb30c |
|
BLAKE2b-256 | 8f9c687d4f8c875e283cf7ba2d71671fa805ff45f1d7cb3a919a3c0c17581cdf |
File details
Details for the file curltopy-0.1.2-py2-none-any.whl
.
File metadata
- Download URL: curltopy-0.1.2-py2-none-any.whl
- Upload date:
- Size: 4.1 kB
- Tags: Python 2
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/1.12.1 pkginfo/1.4.2 requests/2.21.0 setuptools/40.6.3 requests-toolbelt/0.8.0 tqdm/4.28.1 CPython/3.7.1
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 80e2db70ccd65f3ebcade11aac743966ea54125a8d62f32147d73548fcf3f578 |
|
MD5 | d91ad6e655cc95695f727d4dc1bccede |
|
BLAKE2b-256 | 291ff217fb9e657a56205a7da38d0e0b0f2cfaa4e1fe88d0a8cfb8d4fdacdda6 |