index.rst
This file
Path
docs/index.rst
176 lines · 5.0 KiB
Last changed by
Merge branch 'master' of github.com:kennethreitz/requestsKenneth Reitzbefore adoptionb60c5a5
History of this fileTake 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.python.org/pypi/requests1314.. image:: https://img.shields.io/pypi/wheel/requests.svg15 :target: https://pypi.python.org/pypi/requests1617.. image:: https://img.shields.io/pypi/pyversions/requests.svg18 :target: https://pypi.python.org/pypi/requests1920.. image:: https://travis-ci.org/kennethreitz/requests.svg?branch=master21 :target: https://travis-ci.org/kennethreitz/requests2223.. image:: https://codecov.io/github/kennethreitz/requests/coverage.svg?branch=master24 :target: https://codecov.io/github/kennethreitz/requests25 :alt: codecov.io2627.. image:: https://img.shields.io/badge/Say%20Thanks!-🦉-1EAEDB.svg28 :target: https://saythanks.io/to/kennethreitz293031**Requests** is the only *Non-GMO* HTTP library for Python, safe for human32consumption.3334*Warning: Recreational use of other HTTP libraries may result in dangerous side-effects,35including: security vulnerabilities, verbose code, reinventing the wheel,36constantly reading documentation, depression, headaches, or even death.*3738-------------------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, powered by `urllib3 <https://github.com/shazow/urllib3>`_,61which is embedded within Requests.6263User Testimonials64-----------------6566The NSA, Her Majesty's Government, Amazon, Google, Twilio, Runscope, Mozilla, Heroku,67PayPal, NPR, Obama for America, Transifex, Native Instruments, The Washington68Post, Twitter, SoundCloud, Kippt, Sony, and Federal U.S.69Institutions that prefer to be unnamed claim to use Requests internally.7071**Armin Ronacher**—72 *Requests is the perfect example how beautiful an API can be with the73 right level of abstraction.*7475**Matt DeBoard**—76 *I'm going to get `@kennethreitz <https://twitter.com/kennethreitz>`_'s Python requests module tattooed77 on my body, somehow. The whole thing.*7879**Daniel Greenfeld**—80 *Nuked a 1200 LOC spaghetti code library with 10 lines of code thanks to81 `@kennethreitz <https://twitter.com/kennethreitz>`_'s request library. Today has been AWESOME.*8283**Kenny Meyers**—84 *Python HTTP: When in doubt, or when not in doubt, use Requests. Beautiful,85 simple, Pythonic.*8687Requests is one of the most downloaded Python packages of all time, pulling in88over 11,000,000 downloads every month. All the cool kids are doing it!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`` Support110- Thread-safety111112Requests officially supports Python 2.6–2.7 & 3.3–3.7, and runs great on PyPy.113114115The User Guide116--------------117118This part of the documentation, which is mostly prose, begins with some119background information about Requests, then focuses on step-by-step120instructions for getting the most out of Requests.121122.. toctree::123 :maxdepth: 2124125 user/intro126 user/install127 user/quickstart128 user/advanced129 user/authentication130131132The Community Guide133-------------------134135This part of the documentation, which is mostly prose, details the136Requests ecosystem and community.137138.. toctree::139 :maxdepth: 1140141 community/faq142 community/recommended143 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.