1 Requests: HTTP for Humans
2 =========================
4 .. image:: https://badge.fury.io/py/requests.png
5 :target: http://badge.fury.io/py/requests
7 .. image:: https://pypip.in/d/requests/badge.png
8 :target: https://crate.io/packages/requests/
11 Requests is an Apache2 Licensed HTTP library, written in Python, for human
14 Most existing Python modules for sending HTTP requests are extremely
15 verbose and cumbersome. Python's builtin urllib2 module provides most of
16 the HTTP capabilities you should need, but the api is thoroughly broken.
17 It requires an enormous amount of work (even method overrides) to
18 perform the simplest of tasks.
20 Things shouldn't be this way. Not in Python.
24 >>> r = requests.get('https://api.github.com', auth=('user', 'pass'))
27 >>> r.headers['content-type']
32 See `the same code, without Requests <https://gist.github.com/973705>`_.
34 Requests allow you to send HTTP/1.1 requests. You can add headers, form data,
35 multipart files, and parameters with simple Python dictionaries, and access the
36 response data in the same way. It's powered by httplib and `urllib3
37 <https://github.com/shazow/urllib3>`_, but it does all the hard work and crazy
44 - International Domains and URLs
45 - Keep-Alive & Connection Pooling
46 - Sessions with Cookie Persistence
47 - Browser-style SSL Verification
48 - Basic/Digest Authentication
49 - Elegant Key/Value Cookies
50 - Automatic Decompression
51 - Unicode Response Bodies
52 - Multipart File Uploads
55 - HTTP(S) proxy support
61 To install Requests, simply:
65 $ pip install requests
67 Or, if you absolutely must:
71 $ easy_install requests
73 But, you really shouldn't do that.
79 Documentation is available at http://docs.python-requests.org/.
85 #. Check for open issues or open a fresh issue to start a discussion around a feature idea or a bug. There is a `Contributor Friendly`_ tag for issues that should be ideal for people who are not very familiar with the codebase yet.
86 #. If you feel uncomfortable or uncertain about an issue or your changes, feel free to email @sigmavirus24 and he will happily help you via email, Skype, remote pairing or whatever you are comfortable with.
87 #. Fork `the repository`_ on GitHub to start making your changes to the **master** branch (or branch off of it).
88 #. Write a test which shows that the bug was fixed or that the feature works as expected.
89 #. Send a pull request and bug the maintainer until it gets merged and published. :) Make sure to add yourself to AUTHORS_.
91 .. _`the repository`: http://github.com/kennethreitz/requests
92 .. _AUTHORS: https://github.com/kennethreitz/requests/blob/master/AUTHORS.rst
93 .. _Contributor Friendly: https://github.com/kennethreitz/requests/issues?direction=desc&labels=Contributor+Friendly&page=1&sort=updated&state=open