httpio
HTTP resources as random-access file-like objects
httpio is a small Python library that allows you to access files served over HTTP as file-like objects (which is to say that they support the interface of the standard library’s BufferedIOBase class). It differs from libraries like urllib and requests in that it supports seek() (which moves an internal pointer), and that read() makes a request with the Range header set. It also supports caching of contents using a configurable block size, and will reuse TCP connections where possible.
Installation
Use pip to install httpio:
$ pip install httpio
Usage
import zipfile
import httpio
url = "http://some/large/file.zip"
with httpio.open(url) as fp:
zf = zipfile.ZipFile(fp)
print(zf.namelist())
Unit Tests
Unit tests are provided for the standard behaviours implemented by the library. They can be run with
$ python -m unittest discover -s tests
or a tox.ini file is provided which allows the tests to be run in virtual environments using the tox tool:
$ tox
Metadata
Release files for httpio 0.3.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| httpio-0.3.0.tar.gz | 6.3 kB | Without provenance | Details for httpio-0.3.0.tar.gz |
Release files / httpio-0.3.0.tar.gz
| Download URL | httpio-0.3.0.tar.gz |
|---|---|
| Size | 6.3 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
38dafc07874b5033499af9f1465e2b31f93e6934c52effa76d43695a98af1ae8
|
|
BLAKE2b-256 checksum How to use checksums |
b20104e1fe7470139d5fe39be055c0defde4b80ef42878cee4706664046d87d1
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/1.13.0 pkginfo/1.5.0.1 requests/2.21.0 setuptools/40.8.0 requests-toolbelt/0.9.1 tqdm/4.31.1 CPython/3.5.2
|
Security for httpio 0.3.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.