Skip to content
Myr

Merge pull request #1413 from Lukasa/docs

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

Assorted docs updates

authored by Kenneth Reitz · committed by Kenneth Reitz · parents 3bb13f8, 73425fb · Browse files · 2 files+19 added−2 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+19 added−2 removed

  • other:+19 added−2 removed

2 files+19 added−2 removed

modified:docs/_templates/sidebarintro.html+1 added-2 removed
modified:docs/user/advanced.rst+18 added
266 unmodified lines
267268 >>> requests.get('http://pizzabin.org/admin', auth=PizzaAuth('kenneth'))269 <Response [200]>270271.. _streaming-requests272273Streaming Requests274------------------275276With ``requests.Response.iter_lines()`` you can easily iterate over streaming
298 unmodified lines
575576.. _`described here`: http://kennethreitz.org/exposures/the-future-of-python-http577.. _`urllib3`: https://github.com/shazow/urllib3578579Blocking Or Non-Blocking?580-------------------------581582With the default Transport Adapter in place, Requests does not provide any kind583of non-blocking IO. The ``Response.content`` property will block until the584entire response has been downloaded. If you require more granularity, the585streaming features of the library (see :ref:`streaming-requests`) allow you to586retrieve smaller quantities of the response at a time. However, these calls587will still block.588589If you are concerned about the use of blocking IO, there are lots of projects590out there that combine Requests with one of Python's asynchronicity frameworks.591Two excellent examples are `grequests`_ and `requests-futures`_.592593.. _`grequests`: https://github.com/kennethreitz/grequests594.. _`requests-futures`: https://github.com/ross/requests-futures