Installation
------------
-To install requests, simply:
+To install Requests, simply:
.. code-block:: bash
One key difference that has nothing to do with the API is a change in the
license from the ISC_ license to the `Apache 2.0`_ license. The Apache 2.0
-license ensures that contributions to requests are also covered by the Apache
+license ensures that contributions to Requests are also covered by the Apache
2.0 license.
.. _ISC: http://opensource.org/licenses/ISC
Distributions have been made for many Linux repositories, including: Ubuntu, Debian, RHEL, and Arch.
-These distributions are sometimes divergent forks, or are otherwise not kept up-to-date with the latest code and bugfixes. PyPI (and its mirrors) and GitHub are the official distribution sources; alternatives are not supported by the requests project.
+These distributions are sometimes divergent forks, or are otherwise not kept up-to-date with the latest code and bugfixes. PyPI (and its mirrors) and GitHub are the official distribution sources; alternatives are not supported by the Requests project.
Support for Python 3.1 and 3.2 may be dropped at any time.
-Google App Engine will never be officially supported. Pull requests for compatibility will be accepted, as long as they don't complicate the codebase.
+Google App Engine will never be officially supported. Pull Requests for compatibility will be accepted, as long as they don't complicate the codebase.
Are you crazy?
Distribute & Pip
----------------
-Installing requests is simple with `pip <http://www.pip-installer.org/>`_::
+Installing Requests is simple with `pip <http://www.pip-installer.org/>`_::
$ pip install requests
-Cheeseshop Mirror
+Cheeseshop (PyPI) Mirror
-----------------
-If the Cheeseshop is down, you can also install Requests from one of the
-mirrors. `Crate.io <http://crate.io>`_ is one of them::
+If the Cheeseshop (a.k.a. PyPI) is down, you can also install Requests from one
+of the mirrors. `Crate.io <http://crate.io>`_ is one of them::
$ pip install -i http://simple.crate.io/ requests
The ``gzip`` and ``deflate`` transfer-encodings are automatically decoded for you.
For example, to create an image from binary data returned by a request, you can
-use the following code:
+use the following code::
>>> from PIL import Image
>>> from StringIO import StringIO
------------------------------
Typically, you want to send some form-encoded data — much like an HTML form.
-To do this, simply pass a dictionary to the `data` argument. Your
+To do this, simply pass a dictionary to the ``data`` argument. Your
dictionary of data will automatically be form-encoded when the request is made::
>>> payload = {'key1': 'value1', 'key2': 'value2'}
Timeouts
--------
-You can tell requests to stop waiting for a response after a given number of
+You can tell Requests to stop waiting for a response after a given number of
seconds with the ``timeout`` parameter::
>>> requests.get('http://github.com', timeout=0.001)