Skip to content
Myr

index.rst

This file

Path

docs/index.rst

176 lines · 5.1 KiB

Last changed by

Merge pull request #4672 from requests/remove_2.6_refsNate Prewittbefore adoptiond1aeb7e

History of this file

Take it

1.. Requests documentation master file, created by2   sphinx-quickstart on Sun Feb 13 23:54:25 2011.3   You can adapt this file completely to your liking, but it should at least4   contain the root `toctree` directive.56Requests: HTTP for Humans7=========================89Release v\ |version|. (:ref:`Installation <install>`)1011.. image:: https://img.shields.io/pypi/l/requests.svg12    :target: https://pypi.org/project/requests/1314.. image:: https://img.shields.io/pypi/wheel/requests.svg15    :target: https://pypi.org/project/requests/1617.. image:: https://img.shields.io/pypi/pyversions/requests.svg18    :target: https://pypi.org/project/requests/1920.. image:: https://codecov.io/github/requests/requests/coverage.svg?branch=master21    :target: https://codecov.io/github/requests/requests22    :alt: codecov.io2324.. image:: https://img.shields.io/badge/Say%20Thanks!-🦉-1EAEDB.svg25    :target: https://saythanks.io/to/kennethreitz262728**Requests** is the only *Non-GMO* HTTP library for Python, safe for human29consumption.3031.. note:: The use of **Python 3** is *highly* preferred over Python 2. Consider upgrading your applications and infrastructure if you find yourself *still* using Python 2 in production today. If you are using Python 3, congratulations — you are indeed a person of excellent taste.32  —*Kenneth Reitz*333435-------------------3637**Behold, the power of Requests**::3839    >>> r = requests.get('https://api.github.com/user', auth=('user', 'pass'))40    >>> r.status_code41    20042    >>> r.headers['content-type']43    'application/json; charset=utf8'44    >>> r.encoding45    'utf-8'46    >>> r.text47    u'{"type":"User"...'48    >>> r.json()49    {u'private_gists': 419, u'total_private_repos': 77, ...}5051See `similar code, sans Requests <https://gist.github.com/973705>`_.525354**Requests** allows you to send *organic, grass-fed* HTTP/1.1 requests, without the55need for manual labor. There's no need to manually add query strings to your56URLs, or to form-encode your POST data. Keep-alive and HTTP connection pooling57are 100% automatic, thanks to `urllib3 <https://github.com/shazow/urllib3>`_.5859User Testimonials60-----------------6162Nike, Twitter, Spotify, Microsoft, Amazon, Lyft, BuzzFeed, Reddit, The NSA, Her Majesty's Government, Google, Twilio, Runscope, Mozilla, Heroku,63PayPal, NPR, Obama for America, Transifex, Native Instruments, The Washington64Post, SoundCloud, Kippt, Sony, and Federal U.S.65Institutions that prefer to be unnamed claim to use Requests internally.6667**Armin Ronacher**, creator of Flask—68    *Requests is the perfect example how beautiful an API can be with the69    right level of abstraction.*7071**Matt DeBoard**—72    *I'm going to get Kenneth Reitz's Python requests module tattooed73    on my body, somehow. The whole thing.*7475**Daniel Greenfeld**—76    *Nuked a 1200 LOC spaghetti code library with 10 lines of code thanks to77    Kenneth Reitz's Requests library. Today has been AWESOME.*7879**Kenny Meyers**—80    *Python HTTP: When in doubt, or when not in doubt, use Requests. Beautiful,81    simple, Pythonic.*8283Requests is one of the most downloaded Python packages of all time, pulling in84over 400,000 downloads **each day**. Join the party!8586If your organization uses Requests internally, consider `supporting the development of 3.0 <https://www.kennethreitz.org/requests3>`_. Your87generosity will be greatly appreciated, and help drive the project forward88into the future.8990Beloved Features91----------------9293Requests is ready for today's web.9495- Keep-Alive & Connection Pooling96- International Domains and URLs97- Sessions with Cookie Persistence98- Browser-style SSL Verification99- Automatic Content Decoding100- Basic/Digest Authentication101- Elegant Key/Value Cookies102- Automatic Decompression103- Unicode Response Bodies104- HTTP(S) Proxy Support105- Multipart File Uploads106- Streaming Downloads107- Connection Timeouts108- Chunked Requests109- ``.netrc`` Support110111Requests officially supports Python 2.7 & 3.4–3.7, and runs great on PyPy.112113114The User Guide115--------------116117This part of the documentation, which is mostly prose, begins with some118background information about Requests, then focuses on step-by-step119instructions for getting the most out of Requests.120121.. toctree::122   :maxdepth: 2123124   user/intro125   user/install126   user/quickstart127   user/advanced128   user/authentication129130131The Community Guide132-------------------133134This part of the documentation, which is mostly prose, details the135Requests ecosystem and community.136137.. toctree::138   :maxdepth: 2139140   community/sponsors141   community/recommended142   community/faq143   community/out-there144   community/support145   community/vulnerabilities146   community/updates147   community/release-process148149The API Documentation / Guide150-----------------------------151152If you are looking for information on a specific function, class, or method,153this part of the documentation is for you.154155.. toctree::156   :maxdepth: 2157158   api159160161The Contributor Guide162---------------------163164If you want to contribute to the project, this part of the documentation is for165you.166167.. toctree::168   :maxdepth: 3169170   dev/contributing171   dev/philosophy172   dev/todo173   dev/authors174175There are no more guides. You are now guideless.176Good luck.