index.rst
This file
Path
docs/index.rst
135 lines · 3.7 KiB
Last changed by
merge 2.0 insto masterKenneth Reitzbefore adoption54ad646
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>`)1011Requests is an :ref:`Apache2 Licensed <apache2>` HTTP library, written in Python, for human beings.1213Python's standard **urllib2** module provides most of14the HTTP capabilities you need, but the API is thoroughly **broken**.15It was built for a different time — and a different web. It requires an *enormous* amount of work (even method overrides) to perform the simplest of tasks.1617Things shouldn’t be this way. Not in Python.1819::2021 >>> 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'private_gists': 419, u'total_private_repos': 77, ...}3233See `similar code, without Requests <https://gist.github.com/973705>`_.3435Requests takes all of the work out of Python HTTP/1.1 — making your integration with web services seamless. There's no need to manually add query strings to your URLs, or to form-encode your POST data. Keep-alive and HTTP connection pooling are 100% automatic, powered by `urllib3 <https://github.com/shazow/urllib3>`_, which is embedded within Requests.363738Testimonials39------------4041Her Majesty's Government, Amazon, Google, Twilio, Runscope, Mozilla, Heroku, PayPal, NPR, Obama for America, Transifex, Native Instruments, The Washington Post, Twitter, SoundCloud, Kippt, Readability, and Federal US Institutions use Requests internally. It has been downloaded over 5,000,000 times from PyPI.4243**Armin Ronacher**44 Requests is the perfect example how beautiful an API can be with the45 right level of abstraction.4647**Matt DeBoard**48 I'm going to get @kennethreitz's Python requests module tattooed49 on my body, somehow. The whole thing.5051**Daniel Greenfeld**52 Nuked a 1200 LOC spaghetti code library with 10 lines of code thanks to53 @kennethreitz's request library. Today has been AWESOME.5455**Kenny Meyers**56 Python HTTP: When in doubt, or when not in doubt, use Requests. Beautiful,57 simple, Pythonic.585960Feature Support61---------------6263Requests is ready for today's web.6465- International Domains and URLs66- Keep-Alive & Connection Pooling67- Sessions with Cookie Persistence68- Browser-style SSL Verification69- Basic/Digest Authentication70- Elegant Key/Value Cookies71- Automatic Decompression72- Unicode Response Bodies73- Multipart File Uploads74- Connection Timeouts75- ``.netrc`` support76- Python 2.6—3.377- Thread-safe.787980User Guide81----------8283This part of the documentation, which is mostly prose, begins with some84background information about Requests, then focuses on step-by-step85instructions for getting the most out of Requests.8687.. toctree::88 :maxdepth: 28990 user/intro91 user/install92 user/quickstart93 user/advanced94 user/authentication959697Community Guide98-----------------99100This part of the documentation, which is mostly prose, details the101Requests ecosystem and community.102103.. toctree::104 :maxdepth: 1105106 community/faq107 community/out-there.rst108 community/support109 community/updates110111API Documentation112-----------------113114If you are looking for information on a specific function, class or method,115this part of the documentation is for you.116117.. toctree::118 :maxdepth: 2119120 api121122123Contributor Guide124-----------------125126If you want to contribute to the project, this part of the documentation is for127you.128129.. toctree::130 :maxdepth: 1131132 dev/philosophy133 dev/internals134 dev/todo135 dev/authors