Skip to main content

seekablehttpfile

This project provides a file-like object that fetches parts of a file using HTTP range requests as needed.

>>> from seekablehttpfile import SeekableHttpFile
>>> from zipfile import ZipFile

>>> f = SeekableHttpFile("https://files.pythonhosted.org/packages/cb/90/599c79a248dcae6935331113649de5d75427e320efde21b583648b498584/tensorflow_intel-2.14.0-cp310-cp310-win_amd64.whl")  # 284MB
>>> # use as normal, for example with ZipFile
>>> z = ZipFile(f)
>>> len(z.namelist())
9414
>>> # find out how much we actually read
>>> f.stats
{'num_requests': 2, 'optimistic_bytes_read': 256000, 'lazy_bytes_read': 1078669, 'satisfied_from_cache': 2}

Version Compatibility

Users of this library should be able to use Python 3.7 or above. This is validated by tests, and is the version encoded in Requires-Python.

Development requires Python 3.12 (or 3.13), realistically. CI validates that it works on 3.10 and above, but you will get less checking in flake8. Expect older versions to be dropped as soon as there is a version of mypy, black, etc that is not simultaneously compatible with all development versions.

Notably, this means that while this project might function (and pass tests) on Python 3.7, it's likely that you can't typecheck against it.

License

seekablehttpfile is copyright Tim Hatch, and licensed under the MIT license. I am providing code in this repository to you under an open source license. This is my personal repository; the license you receive to my code is from me and not from my employer. See the LICENSE file for details.

Metadata

Release files for seekablehttpfile 0.1.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for seekablehttpfile 0.1.1
File Size Uploaded Provenance Actions
seekablehttpfile-0.1.1.tar.gz 11.7 kB Without provenance Details for seekablehttpfile-0.1.1.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for seekablehttpfile 0.1.1
File Interpreter ABI Platform Actions
seekablehttpfile-0.1.1-py3-none-any.whl Python 3 none any Details for seekablehttpfile-0.1.1-py3-none-any.whl

Total release size: 22.2 kB

Release files / seekablehttpfile-0.1.1.tar.gz

Download URL seekablehttpfile-0.1.1.tar.gz
Size 11.7 kB
Tags Source
SHA-256 checksum
How to use checksums
393a6391996f57402047983e0020303f933b8e6c8683e5111e754c8e9eea3c84
BLAKE2b-256 checksum
How to use checksums
4e8b2088a9ba14f31052aebd20c77f93e2f2229918b787e4ab4f1a1fec272b4e
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.14.5

Release files / seekablehttpfile-0.1.1-py3-none-any.whl

Download URL seekablehttpfile-0.1.1-py3-none-any.whl
Size 10.4 kB
Tags Python 3
SHA-256 checksum
How to use checksums
4a640881cfef60f02e2df55328b5bc8296bd2fa4ef08dcaecc7fa3a05ba230b0
BLAKE2b-256 checksum
How to use checksums
7d9432231a20a3324103166ae6f9d9d30d8f3ff1f482633c0a4d88b5b6a422f2
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.14.5

Security for seekablehttpfile 0.1.1

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.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page