Skip to content
Myr

Merge pull request #840 from gareth-lloyd/develop

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

add prefetch=False to streaming example

authored by Kenneth Reitz · committed by Kenneth Reitz · parents c8f166f, d9a8556 · Browse files · 1 file+1 added−1 removed
This commit

State

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

Diff stats

1 file+1 added−1 removed

  • other:+1 added−1 removed

1 file+1 added−1 removed

modified:docs/user/advanced.rst+1 added-1 removed
281 unmodified lines
282 import requests283 import json284285 r = requests.post('https://stream.twitter.com/1/statuses/filter.json',286 data={'track': 'requests'}, auth=('username', 'password'))286 data={'track': 'requests'}, auth=('username', 'password'), prefetch=False)287288 for line in r.iter_lines():289 if line: # filter out keep-alive new lines290 print json.loads(line)
271 unmodified lines