seekablehttpfile
A lazy-loading, seekable, remote file object using http range requests
What it is and what it does
SeekableHttpFile wraps remote HTTP files in a file-like interface that uses HTTP range requests to fetch only the bytes you actually read. Instead of downloading a 284 MB file to extract metadata from a ZIP archive, you can open it as a seekable file object and read just the parts you need—the package tracks how many requests were made and how many bytes were actually transferred versus optimistically requested.
The package depends on requests for HTTP operations and keke for its internal logic. It supports Python 3.7 and above, though development and type-checking are validated on 3.10+. The implementation is straightforward: pass a URL to SeekableHttpFile, use it like any file object with seek() and read(), and inspect the stats property to see how efficiently you used the remote resource.
Use it for:
- Extract metadata from large remote ZIP or TAR archives without downloading the entire file
- Read specific sections of remote CSV or log files for analysis or sampling
- Access remote binary files in scientific workflows where only certain byte ranges are needed
- Stream large remote datasets for machine learning pipelines with minimal bandwidth
Worth the install?
AI-flagged interpretation of the facts on this page — verify before relying
Provides a file-like object that fetches remote files over HTTP using range requests, allowing you to seek and read specific parts without downloading the entire file.
Yes, if you need to work with large remote files and can tolerate the early-stage maturity (version 0.1.0, active but small project). The permissive MIT license and low install friction make it a low-risk experiment. Verify server range-request support and caching behavior for your use case before relying on it in production.
Install
seekablehttpfile on PyPI
pip
pip install seekablehttpfileuv
uv add seekablehttpfilepoetry
poetry add seekablehttpfileInstalling seekablehttpfile
Before you install
Low install friction with only two runtime dependencies (requests and keke). Maintenance is active with recent commits, though the project is small (2 stars) and relatively new, so long-term stability is not yet established.
License in practice
MIT license is permissive, allowing free use, modification, and distribution with minimal restrictions—suitable for most commercial and open-source projects.
Quickstart
pip install seekablehttpfile
from seekablehttpfile import SeekableHttpFile
from zipfile import ZipFile
f = SeekableHttpFile("https://example.com/large-file.zip")
z = ZipFile(f)
print(len(z.namelist()))
print(f.stats)
The remote server must support HTTP range requests (Accept-Ranges header); servers that don't will not work correctly with this package.
Verify before relying
- Performance characteristics and overhead of range-request caching strategy compared to full downloads
- Behavior and reliability with servers that don't support HTTP range requests
- Thread-safety and concurrent access patterns
Package facts
| License | MIT (permissive) |
| Python support | supports the current Python release (>=3.7) |
| Install friction | low — pure-Python wheel |
| Runtime dependencies | 2 — requests, keke |
| Maintenance | actively maintained — 926 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 560,585/month — #6,002 on PyPI (30-day window, as of 2026-08-14) |
| Known vulnerabilities | none known (OSV.dev, checked 2026-08-14) |
Evidence: seekablehttpfile-0.1.0-py3-none-any.whl
Tags
More WWW/HTTP packages
urllib3 is an HTTP client library that provides…
permissive · top 100 on PyPI
requestsRequests is a Python HTTP library that…
permissive · top 100 on PyPI
h11h11 is a pure-Python HTTP/1.1 protocol…
permissive · top 100 on PyPI
httpxHTTPX is a fully featured HTTP client library…
permissive · top 100 on PyPI
httpcoreA minimal low-level HTTP client library that…
permissive · top 100 on PyPI
aiohttpaiohttp is an async HTTP client and server…
permissive · top 100 on PyPI
remotezip2Reads and extracts files from ZIP archives…
permissive · top 15,000 on PyPI
multiurlDownloads files from one or multiple URLs into…
permissive · top 5,000 on PyPI
stream-unzipStreams unzip operations on ZIP archives…
permissive · top 5,000 on PyPI
zippProvides a pathlib-compatible wrapper around…
permissive · top 100 on PyPI
zipstream-ngGenerates zip files on-the-fly by streaming…
copyleft · top 5,000 on PyPI
iterable-ioWraps iterables (generators, lists, etc.) as…
copyleft · top 15,000 on PyPI
remotezipDownload individual files from remote zip…
permissive · top 15,000 on PyPI
baseten-performance-clientA high-performance Python HTTP client for…
unclear · top 15,000 on PyPI
scpProvides file transfer over SSH using the SCP…
copyleft · top 5,000 on PyPI
pytubepytube downloads YouTube videos and playlists…
permissive · top 5,000 on PyPI