README.rst
This file
Path
README.rst
97 lines · 3.2 KiB
Last changed by
Update README.rstKenneth Reitzbefore adoption169b7ed
History of this fileTake it
1Requests: HTTP for Humans2=========================34.. image:: https://img.shields.io/pypi/v/requests.svg5 :target: https://pypi.python.org/pypi/requests67.. image:: https://img.shields.io/pypi/dm/requests.svg8 :target: https://pypi.python.org/pypi/requests910Requests is the only *Non-GMO* HTTP library for Python, safe for human11consumption.1213**Warning:** Recreational use of other HTTP libraries may result in dangerous side-effects,14including: security vulnerabilities, verbose code, reinventing the wheel,15constantly reading documentation, depression, headaches, or even death.1617Behold, the power of Requests:1819.. code-block:: python2021 >>> r = requests.get('https://api.github.com/user', auth=('user', 'pass'))22 >>> r.status_code23 20024 >>> r.headers['content-type']25 'application/json; charset=utf8'26 >>> r.encoding27 'utf-8'28 >>> r.text29 u'{"type":"User"...'30 >>> r.json()31 {u'disk_usage': 368627, u'private_gists': 484, ...}3233See `the similar code, sans Requests <https://gist.github.com/973705>`_.3435Requests allows you to send *organic, grass-fed* HTTP/1.1 requests, without the36need for manual labor. There's no need to manually add query strings to your37URLs, or to form-encode your POST data. Keep-alive and HTTP connection pooling38are 100% automatic, powered by `urllib3 <https://github.com/shazow/urllib3>`_,39which is embedded within Requests.4041Besides, all the cool kids are doing it. Requests is one of the most42downloaded Python packages of all time, pulling in over 7,000,000 downloads43every month. You don't want to be left out!4445Feature Support46---------------4748Requests is ready for today's web.4950- International Domains and URLs51- Keep-Alive & Connection Pooling52- Sessions with Cookie Persistence53- Browser-style SSL Verification54- Basic/Digest Authentication55- Elegant Key/Value Cookies56- Automatic Decompression57- Automatic Content Decoding58- Unicode Response Bodies59- Multipart File Uploads60- HTTP(S) Proxy Support61- Connection Timeouts62- Streaming Downloads63- ``.netrc`` Support64- Chunked Requests65- Thread-safety6667Requests supports Python 2.6 — 3.5, and runs great on PyPy.6869Installation70------------7172To install Requests, simply:7374.. code-block:: bash7576 $ pip install requests77 ✨🍰✨7879Satisfaction, guaranteed.8081Documentation82-------------8384Fantastic documentation is available at http://docs.python-requests.org/, for a limited time only.858687How to Contribute88-----------------8990#. 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.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_.9495.. _`the repository`: http://github.com/kennethreitz/requests96.. _AUTHORS: https://github.com/kennethreitz/requests/blob/master/AUTHORS.rst97.. _Contributor Friendly: https://github.com/kennethreitz/requests/issues?direction=desc&labels=Contributor+Friendly&page=1&sort=updated&state=open