Registry / http-networking / seekablehttpfile

seekablehttpfile

JSON →
library0.1.0pypypi✓ verified 83d ago

Provides a lazy-loading, seekable file-like object for remote HTTP files using Range requests. Version 0.1.0 supports Python >= 3.7. Low release cadence.

pip install seekablehttpfile
INSTALL
IMPORT
SIG · SEEKABLEHTTPFILE
S
seekablehttpfile
http-networkingpythonv0.1.0
harness data pending
Install & Compatibility
Where this runs

No compatibility data collected yet for this library.

Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

SeekableHttpFile
from seekablehttpfile import SeekableHttpFile

Opens a remote file via HTTP Range requests and reads a chunk after seeking.

from seekablehttpfile import SeekableHttpFile # Open a remote file with seek support with SeekableHttpFile('https://example.com/large-file.bin') as f: f.seek(1000) data = f.read(1024) print(len(data))
Debug
Known issues
gotchaThe file is lazy-loaded; no data is fetched until first read or seek. An erroneous URL will only raise an exception on read, not on construction.
fix
Call a small read or check status explicitly after construction if you want to fail fast.
affects: all
gotchaSeeking backwards may cause repeated HTTP requests if the new position is before the currently buffered data. The implementation caches entire chunks, but large backward seeks can be inefficient.
fix
Consider using a different strategy for random access patterns or limit seek range.
affects: 0.1.0
deprecatedNo deprecations known at version 0.1.0.
affects: none
Errors
Common errors & fixes
AttributeError: module 'seekablehttpfile' has no attribute 'SeekableHttpFile'
Incorrect import path (e.g., from seekablehttpfile.seekablehttpfile import ...). Only top-level import is supported.
fix
Use: from seekablehttpfile import SeekableHttpFile
requests.exceptions.InvalidURL: Failed to parse: <url>
The library expects a valid HTTP/HTTPS URL. Relative paths or missing scheme cause this.
fix
Ensure the URL starts with http:// or https://.
TypeError: 'NoneType' object is not iterable
Passing an invalid URL that returns a non-200 response (e.g., 404) without proper handling. The library tries to parse response headers.
fix
Check the URL is reachable and returns a valid Content-Range header.
Upgrade
Version history
0.1.0latest on PyPI · released Jan 31, 2024
Audit
Dependencies
requestsrequiredused for HTTP range requests
Agent activity
7 hits · last 30 days
node
6
OpenAI (training)
1
Resources
seekablehttpfile — pip install seekablehttpfile · libregistry