Removed extra extra parentheses in SessionRedirectMixin.resolve_redirects
[services/python-requests.git] / README.rst
1 Requests: HTTP for Humans
2 =========================
3
4 .. image:: https://badge.fury.io/py/requests.png
5     :target: http://badge.fury.io/py/requests
6
7 .. image:: https://pypip.in/d/requests/badge.png
8         :target: https://crate.io/packages/requests/
9
10 .. image:: http://ci.kennethreitz.org/buildStatus/icon?job=requests-trunk
11         :target: http://ci.kennethreitz.org/job/requests-trunk/
12
13
14 Requests is an Apache2 Licensed HTTP library, written in Python, for human
15 beings.
16
17 Most existing Python modules for sending HTTP requests are extremely
18 verbose and cumbersome. Python's builtin urllib2 module provides most of
19 the HTTP capabilities you should need, but the api is thoroughly broken.
20 It requires an enormous amount of work (even method overrides) to
21 perform the simplest of tasks.
22
23 Things shouldn't be this way. Not in Python.
24
25 .. code-block:: pycon
26
27     >>> r = requests.get('https://api.github.com', auth=('user', 'pass'))
28     >>> r.status_code
29     204
30     >>> r.headers['content-type']
31     'application/json'
32     >>> r.text
33     ...
34
35 See `the same code, without Requests <https://gist.github.com/973705>`_.
36
37 Requests allow you to send HTTP/1.1 requests. You can add headers, form data,
38 multipart files, and parameters with simple Python dictionaries, and access the
39 response data in the same way. It's powered by httplib and `urllib3
40 <https://github.com/shazow/urllib3>`_, but it does all the hard work and crazy
41 hacks for you.
42
43
44 Features
45 --------
46
47 - International Domains and URLs
48 - Keep-Alive & Connection Pooling
49 - Sessions with Cookie Persistence
50 - Browser-style SSL Verification
51 - Basic/Digest Authentication
52 - Elegant Key/Value Cookies
53 - Automatic Decompression
54 - Unicode Response Bodies
55 - Multipart File Uploads
56 - Connection Timeouts
57 - Thread-safety
58 - HTTP(S) proxy support
59
60
61 Installation
62 ------------
63
64 To install Requests, simply:
65
66 .. code-block:: bash
67
68     $ pip install requests
69
70 Or, if you absolutely must:
71
72 .. code-block:: bash
73
74     $ easy_install requests
75
76 But, you really shouldn't do that.
77
78
79 Documentation
80 -------------
81
82 Documentation is available at http://docs.python-requests.org/.
83
84
85 Contribute
86 ----------
87
88 #. 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.
89 #. 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.
90 #. Fork `the repository`_ on GitHub to start making your changes to the **master** branch (or branch off of it).
91 #. Write a test which shows that the bug was fixed or that the feature works as expected.
92 #. Send a pull request and bug the maintainer until it gets merged and published. :) Make sure to add yourself to AUTHORS_.
93
94 .. _`the repository`: http://github.com/kennethreitz/requests
95 .. _AUTHORS: https://github.com/kennethreitz/requests/blob/master/AUTHORS.rst
96 .. _Contributor Friendly: https://github.com/kennethreitz/requests/issues?direction=desc&labels=Contributor+Friendly&page=1&sort=updated&state=open