Skip to content
Myr

README.rst

This file

Path

README.rst

98 lines · 3.3 KiB

Last changed by

Update README.rstKenneth Reitzbefore adoptiondfad00a

History of this file

Take it

1Requests: HTTP for Humans2=========================34.. image:: https://img.shields.io/pypi/v/requests.svg5    :target: https://pypi.python.org/pypi/requests6    7Requests is the only *Non-GMO* HTTP library for Python, safe for human8consumption.910**Warning:** Recreational use of other HTTP libraries may result in dangerous side-effects,11including: security vulnerabilities, verbose code, reinventing the wheel,12constantly reading documentation, depression, headaches, or even death.1314Behold, the power of Requests:1516.. code-block:: python1718    >>> r = requests.get('https://api.github.com/user', auth=('user', 'pass'))19    >>> r.status_code20    20021    >>> r.headers['content-type']22    'application/json; charset=utf8'23    >>> r.encoding24    'utf-8'25    >>> r.text26    u'{"type":"User"...'27    >>> r.json()28    {u'disk_usage': 368627, u'private_gists': 484, ...}2930See `the similar code, sans Requests <https://gist.github.com/973705>`_.3132.. image:: http://docs.python-requests.org/en/master/_static/requests-sidebar.png33    :target: http://docs.python-requests.org/343536Requests allows you to send *organic, grass-fed* HTTP/1.1 requests, without the37need for manual labor. There's no need to manually add query strings to your38URLs, or to form-encode your POST data. Keep-alive and HTTP connection pooling39are 100% automatic, powered by `urllib3 <https://github.com/shazow/urllib3>`_,40which is embedded within Requests.4142Besides, all the cool kids are doing it. Requests is one of the most43downloaded Python packages of all time, pulling in over 7,000,000 downloads44every month. You don't want to be left out!4546Feature Support47---------------4849Requests is ready for today's web.5051- International Domains and URLs52- Keep-Alive & Connection Pooling53- Sessions with Cookie Persistence54- Browser-style SSL Verification55- Basic/Digest Authentication56- Elegant Key/Value Cookies57- Automatic Decompression58- Automatic Content Decoding59- Unicode Response Bodies60- Multipart File Uploads61- HTTP(S) Proxy Support62- Connection Timeouts63- Streaming Downloads64- ``.netrc`` Support65- Chunked Requests66- Thread-safety6768Requests officially supports Python 2.6–2.7 & 3.3–3.5, and runs great on PyPy.6970Installation71------------7273To install Requests, simply:7475.. code-block:: bash7677    $ pip install requests78    ✨🍰✨7980Satisfaction, guaranteed.8182Documentation83-------------8485Fantastic documentation is available at http://docs.python-requests.org/, for a limited time only.868788How to Contribute89-----------------9091#. 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.92#. Fork `the repository`_ on GitHub to start making your changes to the **master** branch (or branch off of it).93#. Write a test which shows that the bug was fixed or that the feature works as expected.94#. Send a pull request and bug the maintainer until it gets merged and published. :) Make sure to add yourself to AUTHORS_.9596.. _`the repository`: http://github.com/kennethreitz/requests97.. _AUTHORS: https://github.com/kennethreitz/requests/blob/master/AUTHORS.rst98.. _Contributor Friendly: https://github.com/kennethreitz/requests/issues?direction=desc&labels=Contributor+Friendly&page=1&sort=updated&state=open