README.rst
This file
Path
README.rst
82 lines · 2.5 KiB
Last changed by
Merge pull request #1007 from passy/patch-1Kenneth Reitzbefore adoption7ef6b6b
History of this fileTake it
1Requests: HTTP for Humans2=========================345.. image:: https://travis-ci.org/kennethreitz/requests.png?branch=master6 :target: https://travis-ci.org/kennethreitz/requests78Requests is an Apache2 Licensed HTTP library, written in Python, for human9beings.1011Most existing Python modules for sending HTTP requests are extremely12verbose and cumbersome. Python's builtin urllib2 module provides most of13the HTTP capabilities you should need, but the api is thoroughly broken.14It requires an enormous amount of work (even method overrides) to15perform the simplest of tasks.1617Things shouldn't be this way. Not in Python.1819.. code-block:: pycon2021 >>> r = requests.get('https://api.github.com', auth=('user', 'pass'))22 >>> r.status_code23 20424 >>> r.headers['content-type']25 'application/json'26 >>> r.text27 ...2829See `the same code, without Requests <https://gist.github.com/973705>`_.3031Requests allow you to send HTTP/1.1 requests. You can add headers, form data,32multipart files, and parameters with simple Python dictionaries, and access the33response data in the same way. It's powered by httplib and `urllib334<https://github.com/shazow/urllib3>`_, but it does all the hard work and crazy35hacks for you.363738Features39--------4041- International Domains and URLs42- Keep-Alive & Connection Pooling43- Sessions with Cookie Persistence44- Browser-style SSL Verification45- Basic/Digest Authentication46- Elegant Key/Value Cookies47- Automatic Decompression48- Unicode Response Bodies49- Multipart File Uploads50- Connection Timeouts51- Thread-safety525354Installation55------------5657To install requests, simply:5859.. code-block:: bash6061 $ pip install requests6263Or, if you absolutely must:6465.. code-block:: bash6667 $ easy_install requests6869But, you really shouldn't do that.70717273Contribute74----------7576#. 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.77#. Fork `the repository`_ on Github to start making your changes to the **develop** branch (or branch off of it).78#. Write a test which shows that the bug was fixed or that the feature works as expected.79#. Send a pull request and bug the maintainer until it gets merged and published. :) Make sure to add yourself to AUTHORS_.8081.. _`the repository`: http://github.com/kennethreitz/requests82.. _AUTHORS: https://github.com/kennethreitz/requests/blob/master/AUTHORS.rst