Registry / data / filechunkio

filechunkio

JSON →
library1.8pypypi✓ verified 86d ago

FileChunkIO provides a file-like object representing a chunk of an OS-level file, supporting reading, writing, and random access within a byte range. Version 1.8 is the latest (2014), with no recent updates; stable but unmaintained.

pip install filechunkio
INSTALL
IMPORT
SIG · FILECHUNKIO
F
filechunkio
datapythonv1.8
Install
2.3s avg
Import
Disk
17MB
Pass rate
10/ 10
Env Coverage10 / 10
glibc
3.93.13
musl
3.93.13
Install & Compatibility
Where this runs
tested against v1.8 · pip install
no network on importno background threads
Install × environment matrix
Each cell = how many times install + import succeeded across repeated harness runs. Partial = flaky.
glibc = Debian/Ubuntu slim · musl = Alpine Linux
musl
py 3.103.95 runs
installs and imports cleanly · install 0.0s · import 0.000s · 19.2MB
glibc
py 3.103.95 runs
installs and imports cleanly · install 2.3s · import 0.000s · 20MB
17MB installed
● package 17MB
Code
Verified usage

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

FileChunkIO
from filechunkio import FileChunkIO
Standard import path

Opens a chunk of 'test.bin' from offset 0 for 512 bytes and reads it.

from filechunkio import FileChunkIO with open('test.bin', 'wb') as f: f.write(b'a' * 1024) with FileChunkIO('test.bin', 'r', offset=0, bytes=512) as chunk: data = chunk.read() print(len(data)) # 512
Debug
Known issues
gotchaFileChunkIO does not support 'w' mode for writing arbitrarily; only 'r', 'r+', 'a', 'a+', 'w', 'w+'. Opening with 'w' truncates the entire file, not just the chunk range.
fix
Use 'r+' mode and write only within the intended byte range; avoid 'w' mode unless you intend to truncate the whole file.
affects: <2.0
deprecatedThis library is effectively unmaintained since 2014. No Python 3 support beyond basic compatibility; may have issues with newer Python versions (e.g., file descriptor handling).
fix
Consider alternatives like 'io.BytesIO' or 'mmap' if possible.
affects: all
gotchaThe 'bytes' parameter specifies the number of bytes in the chunk, not the end offset. The actual accessible region is [offset, offset+bytes). If 'bytes' is None, the chunk extends to end of file.
fix
Ensure you compute the correct byte count; do not mistake 'bytes' for end offset.
affects: all
Errors
Common errors & fixes
FileChunkIO requires integer offset and bytes
Passing non-integer types (e.g., strings) for offset or bytes raises TypeError.
fix
Convert offset and bytes to int explicitly: int(offset).
ValueError: I/O operation on closed file
Attempting to read/write after closing the FileChunkIO object.
fix
Ensure all operations are done within a context manager or before calling close().
Upgrade
Version history
1.8latest on PyPI · released Jun 19, 2016
Audit
Dependencies

No dependency data recorded yet.

Agent activity
2 hits · last 30 days
node
2
Resources
filechunkio — pip install filechunkio · libregistry