improved docs, dep bump, and switched to setuptools
This commit is contained in:
parent
48d38192d2
commit
80ef09fa1a
15
CHANGELOG.md
15
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
|
||||
Initial release
|
||||
|
23
Readme.md
23
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/
|
8
setup.py
8
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",
|
||||
|
Loading…
Reference in New Issue
Block a user