| OLD | NEW |
| (Empty) |
| 1 Requests: HTTP for Humans | |
| 2 ========================= | |
| 3 | |
| 4 .. image:: https://img.shields.io/pypi/v/requests.svg | |
| 5 :target: https://pypi.python.org/pypi/requests | |
| 6 | |
| 7 .. image:: https://img.shields.io/pypi/dm/requests.svg | |
| 8 :target: https://pypi.python.org/pypi/requests | |
| 9 | |
| 10 Requests is the only *Non-GMO* HTTP library for Python, safe for human | |
| 11 consumption. | |
| 12 | |
| 13 **Warning:** Recreational use of other HTTP libraries may result in dangerous si
de-effects, | |
| 14 including: security vulnerabilities, verbose code, reinventing the wheel, | |
| 15 constantly reading documentation, depression, headaches, or even death. | |
| 16 | |
| 17 Behold, the power of Requests: | |
| 18 | |
| 19 .. code-block:: python | |
| 20 | |
| 21 >>> r = requests.get('https://api.github.com/user', auth=('user', 'pass')) | |
| 22 >>> r.status_code | |
| 23 200 | |
| 24 >>> r.headers['content-type'] | |
| 25 'application/json; charset=utf8' | |
| 26 >>> r.encoding | |
| 27 'utf-8' | |
| 28 >>> r.text | |
| 29 u'{"type":"User"...' | |
| 30 >>> r.json() | |
| 31 {u'disk_usage': 368627, u'private_gists': 484, ...} | |
| 32 | |
| 33 See `the similar code, sans Requests <https://gist.github.com/973705>`_. | |
| 34 | |
| 35 Requests allows you to send *organic, grass-fed* HTTP/1.1 requests, without the | |
| 36 need for manual labor. There's no need to manually add query strings to your | |
| 37 URLs, or to form-encode your POST data. Keep-alive and HTTP connection pooling | |
| 38 are 100% automatic, powered by `urllib3 <https://github.com/shazow/urllib3>`_, | |
| 39 which is embedded within Requests. | |
| 40 | |
| 41 Besides, all the cool kids are doing it. Requests is one of the most | |
| 42 downloaded Python packages of all time, pulling in over 7,000,000 downloads | |
| 43 every month. You don't want to be left out! | |
| 44 | |
| 45 Feature Support | |
| 46 --------------- | |
| 47 | |
| 48 Requests is ready for today's web. | |
| 49 | |
| 50 - International Domains and URLs | |
| 51 - Keep-Alive & Connection Pooling | |
| 52 - Sessions with Cookie Persistence | |
| 53 - Browser-style SSL Verification | |
| 54 - Basic/Digest Authentication | |
| 55 - Elegant Key/Value Cookies | |
| 56 - Automatic Decompression | |
| 57 - Automatic Content Decoding | |
| 58 - Unicode Response Bodies | |
| 59 - Multipart File Uploads | |
| 60 - HTTP(S) Proxy Support | |
| 61 - Connection Timeouts | |
| 62 - Streaming Downloads | |
| 63 - ``.netrc`` Support | |
| 64 - Chunked Requests | |
| 65 - Thread-safety | |
| 66 | |
| 67 Requests supports Python 2.6 — 3.5, and runs great on PyPy. | |
| 68 | |
| 69 Installation | |
| 70 ------------ | |
| 71 | |
| 72 To install Requests, simply: | |
| 73 | |
| 74 .. code-block:: bash | |
| 75 | |
| 76 $ pip install requests | |
| 77 ✨🍰✨ | |
| 78 | |
| 79 Satisfaction, guaranteed. | |
| 80 | |
| 81 Documentation | |
| 82 ------------- | |
| 83 | |
| 84 Fantastic documentation is available at http://docs.python-requests.org/, for a
limited time only. | |
| 85 | |
| 86 | |
| 87 How to Contribute | |
| 88 ----------------- | |
| 89 | |
| 90 #. Check for open issues or open a fresh issue to start a discussion around a fe
ature idea or a bug. There is a `Contributor Friendly`_ tag for issues that shou
ld be ideal for people who are not very familiar with the codebase yet. | |
| 91 #. Fork `the repository`_ on GitHub to start making your changes to the **master
** branch (or branch off of it). | |
| 92 #. Write a test which shows that the bug was fixed or that the feature works as
expected. | |
| 93 #. Send a pull request and bug the maintainer until it gets merged and published
. :) Make sure to add yourself to AUTHORS_. | |
| 94 | |
| 95 .. _`the repository`: http://github.com/kennethreitz/requests | |
| 96 .. _AUTHORS: https://github.com/kennethreitz/requests/blob/master/AUTHORS.rst | |
| 97 .. _Contributor Friendly: https://github.com/kennethreitz/requests/issues?direct
ion=desc&labels=Contributor+Friendly&page=1&sort=updated&state=open | |
| OLD | NEW |