--- id: seekablehttpfile version: "0.1.0" license: MIT license_treatment: permissive maintenance: active --- # seekablehttpfile — A lazy-loading, seekable, remote file object using http range requests License: permissive · Maintenance: active · Downloads: 560.6K/mo ## 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 above — 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 pip install seekablehttpfile uv add seekablehttpfile 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_current - Install friction: low - Maintenance: active - Downloads: 560.6K/month (top 15,000 on PyPI) - Known vulnerabilities: none known ## Tags http range requests file, lazy load remote files, seekable http file object, partial file download http, stream remote files efficiently, http-streaming, lazy-loading [View on SkillFed](https://skillfed.io/packages/seekablehttpfile) · [View on PyPI](https://pypi.org/project/seekablehttpfile/)