index.rst
This file
Path
docs/index.rst
144 lines · 3.7 KiB
Last changed by
21mKenneth Reitzbefore adoption53d3cec
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 in12Python, for human beings.1314Python's standard **urllib2** module provides most of15the HTTP capabilities you need, but the API is thoroughly **broken**.16It was built for a different time — and a different web. It requires an17*enormous* amount of work (even method overrides) to perform the simplest of18tasks.1920Things shouldn’t be this way. Not in Python.2122::2324 >>> r = requests.get('https://api.github.com/user', auth=('user', 'pass'))25 >>> r.status_code26 20027 >>> r.headers['content-type']28 'application/json; charset=utf8'29 >>> r.encoding30 'utf-8'31 >>> r.text32 u'{"type":"User"...'33 >>> r.json()34 {u'private_gists': 419, u'total_private_repos': 77, ...}3536See `similar code, without Requests <https://gist.github.com/973705>`_.3738Requests takes all of the work out of Python HTTP/1.1 — making your integration39with web services seamless. There's no need to manually add query strings to40your URLs, or to form-encode your POST data. Keep-alive and HTTP connection41pooling are 100% automatic, powered by `urllib3 <https://github.com/shazow/urllib3>`_,42which is embedded within Requests.434445Testimonials46------------4748Her Majesty's Government, Amazon, Google, Twilio, Runscope, Mozilla, Heroku,49PayPal, NPR, Obama for America, Transifex, Native Instruments, The Washington50Post, Twitter, SoundCloud, Kippt, Readability, Sony, and Federal US Institutions51use Requests internally. It has been downloaded over 21,000,000 times from PyPI.5253**Armin Ronacher**54 Requests is the perfect example how beautiful an API can be with the55 right level of abstraction.5657**Matt DeBoard**58 I'm going to get @kennethreitz's Python requests module tattooed59 on my body, somehow. The whole thing.6061**Daniel Greenfeld**62 Nuked a 1200 LOC spaghetti code library with 10 lines of code thanks to63 @kennethreitz's request library. Today has been AWESOME.6465**Kenny Meyers**66 Python HTTP: When in doubt, or when not in doubt, use Requests. Beautiful,67 simple, Pythonic.686970Feature Support71---------------7273Requests is ready for today's web.7475- International Domains and URLs76- Keep-Alive & Connection Pooling77- Sessions with Cookie Persistence78- Browser-style SSL Verification79- Basic/Digest Authentication80- Elegant Key/Value Cookies81- Automatic Decompression82- Unicode Response Bodies83- Multipart File Uploads84- Connection Timeouts85- ``.netrc`` support86- Python 2.6—3.487- Thread-safe.888990User Guide91----------9293This part of the documentation, which is mostly prose, begins with some94background information about Requests, then focuses on step-by-step95instructions for getting the most out of Requests.9697.. toctree::98 :maxdepth: 299100 user/intro101 user/install102 user/quickstart103 user/advanced104 user/authentication105106107Community Guide108-----------------109110This part of the documentation, which is mostly prose, details the111Requests ecosystem and community.112113.. toctree::114 :maxdepth: 1115116 community/faq117 community/out-there.rst118 community/support119 community/updates120121API Documentation122-----------------123124If you are looking for information on a specific function, class or method,125this part of the documentation is for you.126127.. toctree::128 :maxdepth: 2129130 api131132133Contributor Guide134-----------------135136If you want to contribute to the project, this part of the documentation is for137you.138139.. toctree::140 :maxdepth: 1141142 dev/philosophy143 dev/todo144 dev/authors