Requests wrapper to stream things in chunks, with optional timeout
Go to file
Kevin Froman 9cda9145ed added long desc to setup.py 2020-04-06 03:24:44 -05:00
streamedrequests Post and get now return a tuple with a full requests response object and the response data 2019-07-08 23:54:07 -05:00
tests Post and get now return a tuple with a full requests response object and the response data 2019-07-08 23:54:07 -05:00
.gitignore work on tests 2019-07-07 19:16:41 -05:00
.travis.yml initial commit 2019-07-04 03:26:32 -05:00
CHANGELOG.md improved docs, dep bump, and switched to setuptools 2020-04-06 03:21:04 -05:00
LICENSE initial commit 2019-07-04 03:26:32 -05:00
Makefile initial commit 2019-07-04 03:26:32 -05:00
Readme.md improved docs, dep bump, and switched to setuptools 2020-04-06 03:21:04 -05:00
requirements.in added requirements.txt 2019-07-08 00:30:35 -05:00
requirements.txt Bump requests from 2.22.0 to 2.23.0 2020-04-06 08:04:01 +00:00
run_tests.sh initial commit 2019-07-04 03:26:32 -05:00
setup.py added long desc to setup.py 2020-04-06 03:24:44 -05:00

Readme.md

StreamedRequests

Build Status

Python module to stream HTTP requests in order to ensure content length sanity.

Install

$ pip install StreamedRequests

Basic Usage

from streamedrequests import get, post

def my_func(data):
    # prints every 5 bytes of data from site
    print(data)

get('https://example.com/', callback=my_func, chunk_size=5)

sync: bool (default True) when set to false creates and starts a new thread for streaming

request_headers param can be used to set req headers

post() is the same, but use post_data to set request body.

Contact

https://chaoswebs.net/