skillfed

seekablehttpfile

A lazy-loading, seekable, remote file object using http range requests

seekablehttpfile v0.1.0 560.6K downloads/30d#6,002 on PyPI2
Permissive license MIT Active released

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 seekablehttpfile

uv

uv add seekablehttpfile

poetry

poetry add seekablehttpfile

Installing 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

http range requests filelazy load remote filesseekable http file objectpartial file download httpstream remote files efficiently
http-streaminglazy-loading

More WWW/HTTP packages