Skip to content
Myr

update

Before adoption: this commit came in with the history the project adopted, so no landing records it.

authored by Kenneth Reitz · committed by Kenneth Reitz · parent ba2b355 · Browse files · 2 files+49 added−29 removed
This commit

State

Before adoption: this commit came in with the history the project adopted, so no landing records it.

Diff stats

2 files+49 added−29 removed

  • other:+49 added−29 removed

2 files+49 added−29 removed

modified:docs/index.rst+29 added-19 removed
6 unmodified lines
7=========================89Release v\ |version|. (:ref:`Installation <install>`)1011Requests is an :ref:`Apache2 Licensed <apache2>` HTTP library, written in12Python, for human beings.11Requests is the only *Non-GMO* HTTP library for Python, safe for human12consumption.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.14**Warning:** Recreational use of other HTTP libraries may result in dangerous side-effects,15including: security vulnerabilities, verbose code, reinventing the wheel,16constantly reading documentation, depression, headaches, or even death.1720Things shouldn’t be this way. Not in Python.2118::1920 >>> r = requests.get('https://api.github.com/user', auth=('user', 'pass'))21 >>> r.status_code
6 unmodified lines
28 u'{"type":"User"...'29 >>> r.json()30 {u'private_gists': 419, u'total_private_repos': 77, ...}3136See `similar code, without Requests <https://gist.github.com/973705>`_.32See `similar code, sans Requests <https://gist.github.com/973705>`_.3338Requests 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>`_,3435Requests allows you to send *organic, grass-fed* HTTP/1.1 requests, without the36need for manual labor. There's no need to manually add query strings to your37URLs, or to form-encode your POST data. Keep-alive and HTTP connection pooling38are 100% automatic, powered by `urllib3 <https://github.com/shazow/urllib3>`_,39which is embedded within Requests.4041But wait, there's more! Headers, cookies, json/form data, multipart files, and42url parameters can all be provided with standard Python dictionaries.43Responses feature RFC-compliant redirection history, unicode/bytes bodies, a44case-insensitive header dictionary, and more.4546Besides, all the cool kids are doing it. Requests is one of the most47downloaded Python packages of all time, pulling in over 6,000,000 downloads48every month. You don't want to be left out!4950Testimonials51------------5253Her Majesty's Government, Amazon, Google, Twilio, Runscope, Mozilla, Heroku,54PayPal, NPR, Obama for America, Transifex, Native Instruments, The Washington50Post, Twitter, SoundCloud, Kippt, Readability, Sony, and Federal US Institutions that prefer to be unnamed51use Requests internally. It has been downloaded over 60,000,000 times from PyPI.55Post, Twitter, SoundCloud, Kippt, Readability, Sony, and Federal U.S.56Institutions that prefer to be unnamed claim to use Requests internally.5758**Armin Ronacher**59 Requests is the perfect example how beautiful an API can be with the60 right level of abstraction.
22 unmodified lines
83- Browser-style SSL Verification84- Basic/Digest Authentication85- Elegant Key/Value Cookies86- Automatic Decompression87- Automatic Content Decoding88- Unicode Response Bodies89- Multipart File Uploads90- HTTP(S) Proxy Support91- Connection Timeouts92- Streaming Downloads85- ``.netrc`` support86- Python 2.6—3.587- Thread-safe.93- ``.netrc`` Support94- Chunked Requests95- Thread-safety9697Requests supports Python 2.6 — 3.5, and runs great on PyPy.9899100User Guide101----------102103This part of the documentation, which is mostly prose, begins with some
55 unmodified lines
modified:README.rst+20 added-10 removed
28 unmodified lines
29 {u'disk_usage': 368627, u'private_gists': 484, ...}3031See `the similar code, sans Requests <https://gist.github.com/973705>`_.3233Requests allows you to send *organic, grass-fed* HTTP/1.1 requests, all day.34Headers, cookies, json/form data, multipart files, and url parameters can all35be provided with standard Python dictionaries. 33Requests allows you to send *organic, grass-fed* HTTP/1.1 requests, without the34need for manual labor. There's no need to manually add query strings to your35URLs, or to form-encode your POST data. Keep-alive and HTTP connection pooling36are 100% automatic, powered by `urllib3 <https://github.com/shazow/urllib3>`_,37which is embedded within Requests.3839But wait, there's more! Headers, cookies, json/form data, multipart files, and40url parameters can all be provided with standard Python dictionaries.41Responses feature RFC-compliant redirection history, unicode/bytes bodies, a42case-insensitive header dictionary, and more.4339Besides, all the cool kids are doing it. Requests is one of the most 40downloaded Python packages of all time, pulling in over 6,000,000 downloads 41every month. You don't want to be left out! 44Besides, all the cool kids are doing it. Requests is one of the most45downloaded Python packages of all time, pulling in over 6,000,000 downloads46every month. You don't want to be left out!4743Special Features44----------------48Feature Support49---------------5051Requests is ready for today's web.5253- International Domains and URLs54- Keep-Alive & Connection Pooling55- Sessions with Cookie Persistence56- Browser-style SSL Verification
2 unmodified lines
59- Automatic Decompression60- Automatic Content Decoding61- Unicode Response Bodies62- Multipart File Uploads56- HTTP(S) proxy support63- HTTP(S) Proxy Support64- Connection Timeouts65- Streaming Downloads66- ``.netrc`` Support67- Chunked Requests68- Thread-safety6970Requests supports Python 2.6 — 3.5, and runs great on PyPy.7172Installation73------------7475To install Requests, simply:
1 unmodified line
77.. code-block:: bash7879 $ pip install requests8071Satisfaction, guaranteed. 81Satisfaction, guaranteed.8283Documentation84-------------85
14 unmodified lines