From 80ef09fa1abe8ce2427cdb9825bfa5e56c7f1d82 Mon Sep 17 00:00:00 2001 From: Kevin Froman Date: Mon, 6 Apr 2020 03:21:04 -0500 Subject: [PATCH] improved docs, dep bump, and switched to setuptools --- CHANGELOG.md | 15 ++++++++++++++- Readme.md | 23 +++++++++++++++++++++++ setup.py | 8 ++++---- 3 files changed, 41 insertions(+), 5 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 1d7c110..d719465 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,19 @@ This project uses Semantic Versioning +## 1.0.2 + +Fixed setup.py url + + +## 1.0.1 + +Updated requests version + +Switched to setuptools + +Updated readme + ## 1.0.0 Post and get now return a tuple with a full requests response object and the response data @@ -12,4 +25,4 @@ Fixed broken max_size validator, added tests for max_size validation ## 0.0.0 -Initial release \ No newline at end of file +Initial release diff --git a/Readme.md b/Readme.md index ecb8a64..ae44dde 100644 --- a/Readme.md +++ b/Readme.md @@ -4,6 +4,29 @@ 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/ \ No newline at end of file diff --git a/setup.py b/setup.py index d6b6333..583481e 100644 --- a/setup.py +++ b/setup.py @@ -1,12 +1,12 @@ -from distutils.core import setup +from setuptools import setup, find_packages setup(name='streamedrequests', - version='1.0.0', + version='1.0.2', description='Library for streaming http get or post request\'s responses', author='Kevin Froman', author_email='beardog@mailbox.org', - url='https://github.com/beardog108/streamedrequests', - packages=['streamedrequests'], + url='https://github.com/beardog108/StreamedRequests', + packages=find_packages(exclude=['contrib', 'docs', 'tests']), install_requires=['requests'], classifiers=[ "Programming Language :: Python :: 3",