Skip to content
Myr

index.rst

This file

Path

docs/index.rst

179 lines · 5.3 KiB

Last changed by

Update index.rstKenneth Reitzbefore adoptiond26f631

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 Humans™7==========================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*33  34  35If you're interested in financially supporting Kenneth Reitz open source, consider visiting  `this link <https://cash.me/kennethreitz>`_. Your support helps tremendously with sustainability of motivation, as Open Source is no longer part of my day job.363738-------------------3940**Behold, the power of Requests**::4142    >>> r = requests.get('https://api.github.com/user', auth=('user', 'pass'))43    >>> r.status_code44    20045    >>> r.headers['content-type']46    'application/json; charset=utf8'47    >>> r.encoding48    'utf-8'49    >>> r.text50    u'{"type":"User"...'51    >>> r.json()52    {u'private_gists': 419, u'total_private_repos': 77, ...}5354See `similar code, sans Requests <https://gist.github.com/973705>`_.555657**Requests** allows you to send *organic, grass-fed* HTTP/1.1 requests, without the58need for manual labor. There's no need to manually add query strings to your59URLs, or to form-encode your POST data. Keep-alive and HTTP connection pooling60are 100% automatic, thanks to `urllib3 <https://github.com/shazow/urllib3>`_.6162User Testimonials63-----------------6465Nike, Twitter, Spotify, Microsoft, Amazon, Lyft, BuzzFeed, Reddit, The NSA, Her Majesty's Government, Google, Twilio, Runscope, Mozilla, Heroku,66PayPal, NPR, Obama for America, Transifex, Native Instruments, The Washington67Post, SoundCloud, Kippt, Sony, and Federal U.S.68Institutions that prefer to be unnamed claim to use Requests internally.6970**Armin Ronacher**, creator of Flask—71    *Requests is the perfect example how beautiful an API can be with the72    right level of abstraction.*7374**Matt DeBoard**—75    *I'm going to get Kenneth Reitz's Python requests module tattooed76    on my body, somehow. The whole thing.*7778**Daniel Greenfeld**—79    *Nuked a 1200 LOC spaghetti code library with 10 lines of code thanks to80    Kenneth Reitz's Requests library. Today has been AWESOME.*8182**Kenny Meyers**—83    *Python HTTP: When in doubt, or when not in doubt, use Requests. Beautiful,84    simple, Pythonic.*8586Requests is one of the most downloaded Python packages of all time, pulling in87over 400,000 downloads **each day**. Join the party!8889If your organization uses Requests internally, consider `supporting the development of 3.0 <https://www.kennethreitz.org/requests3>`_. Your90generosity will be greatly appreciated, and help drive the project forward91into the future.9293Beloved Features94----------------9596Requests is ready for today's web.9798- Keep-Alive & Connection Pooling99- International Domains and URLs100- Sessions with Cookie Persistence101- Browser-style SSL Verification102- Automatic Content Decoding103- Basic/Digest Authentication104- Elegant Key/Value Cookies105- Automatic Decompression106- Unicode Response Bodies107- HTTP(S) Proxy Support108- Multipart File Uploads109- Streaming Downloads110- Connection Timeouts111- Chunked Requests112- ``.netrc`` Support113114Requests officially supports Python 2.7 & 3.4–3.7, and runs great on PyPy.115116117The User Guide118--------------119120This part of the documentation, which is mostly prose, begins with some121background information about Requests, then focuses on step-by-step122instructions for getting the most out of Requests.123124.. toctree::125   :maxdepth: 2126127   user/intro128   user/install129   user/quickstart130   user/advanced131   user/authentication132133134The Community Guide135-------------------136137This part of the documentation, which is mostly prose, details the138Requests ecosystem and community.139140.. toctree::141   :maxdepth: 2142143   community/sponsors144   community/recommended145   community/faq146   community/out-there147   community/support148   community/vulnerabilities149   community/updates150   community/release-process151152The API Documentation / Guide153-----------------------------154155If you are looking for information on a specific function, class, or method,156this part of the documentation is for you.157158.. toctree::159   :maxdepth: 2160161   api162163164The Contributor Guide165---------------------166167If you want to contribute to the project, this part of the documentation is for168you.169170.. toctree::171   :maxdepth: 3172173   dev/contributing174   dev/philosophy175   dev/todo176   dev/authors177178There are no more guides. You are now guideless.179Good luck.