Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    text
    copied!<p>I know its been said already, but I'd highly recommend the Requests python package: <a href="http://docs.python-requests.org/en/latest/index.html" rel="noreferrer">http://docs.python-requests.org/en/latest/index.html</a></p> <p>If you've used languages other than python, you're probably thinking urllib and urllib2 are easy to use, not much code, and highly capable, that's how I used to think. But the Requests package is so unbelievably useful and short that everyone should be using it.</p> <p>First, it supports a fully restful API, and is as easy as:</p> <pre><code>import requests ... resp = requests.get('http://www.mywebsite.com/user') resp = requests.post('http://www.mywebsite.com/user') resp = requests.put('http://www.mywebsite.com/user/put') resp = requests.delete('http://www.mywebsite.com/user/delete') </code></pre> <p>Regardless of whether GET/POST you never have to encode parameters again, it simply takes a dictionary as an argument and is good to go.</p> <pre><code>userdata = {"firstname": "John", "lastname": "Doe", "password": "jdoe123"} resp = requests.post('http://www.mywebsite.com/user', data=userdata) </code></pre> <p>Plus it even has a built in json decoder (again, i know json.loads() isn't a lot more to write, but this sure is convenient):</p> <pre><code>resp.json() </code></pre> <p>Or if your response data is just text, use:</p> <pre><code>resp.text </code></pre> <p>This is just the tip of the iceberg. This is the list of features from the requests site:</p> <ul> <li>International Domains and URLs</li> <li>Keep-Alive &amp; Connection Pooling</li> <li>Sessions with Cookie Persistence</li> <li>Browser-style SSL Verification</li> <li>Basic/Digest Authentication</li> <li>Elegant Key/Value Cookies</li> <li>Automatic Decompression</li> <li>Unicode Response Bodies</li> <li>Multipart File Uploads</li> <li>Connection Timeouts</li> <li>.netrc support</li> <li>List item</li> <li>Python 2.6—3.4</li> <li>Thread-safe.</li> </ul>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload