Python Input objects library, file-like objects, i.e., remote file download with retry under file-like API
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
input_objects
.gitignore
LICENSE
MANIFEST.in
README.md
setup.cfg
setup.py

README.md

Input object library

Uniform API for reading from multiple different sources.

Contains reconnecting reading file like object for uninterrupted stream reading of remote files.

import requests, lz4framed, input_obj
url = 'https://ph4r05.deadcode.me/static/lz4/certificates.20171002T020001.15.json.lz4'
iobj = input_obj.ReconnectingLinkInputObject(url=url, timeout=5*60, max_reconnects=1000)
for idx, chunk in enumerate(lz4framed.Decompressor(iobj)):
    print(chunk)

Pip package

pip install -U pip setuptools twine
python setup.py sdist
twine upload dist/*