Requests wrapper to stream things in chunks, with optional timeout
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
Kevin Froman 9cda9145ed added long desc to setup.py 3 years ago
streamedrequests Post and get now return a tuple with a full requests response object and the response data 3 years ago
tests Post and get now return a tuple with a full requests response object and the response data 3 years ago
.gitignore work on tests 3 years ago
.travis.yml initial commit 3 years ago
CHANGELOG.md improved docs, dep bump, and switched to setuptools 3 years ago
LICENSE initial commit 3 years ago
Makefile initial commit 3 years ago
Readme.md improved docs, dep bump, and switched to setuptools 3 years ago
requirements.in added requirements.txt 3 years ago
requirements.txt Bump requests from 2.22.0 to 2.23.0 3 years ago
run_tests.sh initial commit 3 years ago
setup.py added long desc to setup.py 3 years ago

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/