File like object that splits data across volumes
Project description
splitfile
Python file-like object that facilitates reading and writing of binary data split across multiple volumes (files) of a specified size. Supports random access IO.
Can be used with modules such as tarfile, zipfile, lzma, etc. enabling read/write of split archives.
Note: Version 2.0 removes previously integrated encryption and compression options. The breadth of choice across both suggests they are better handled as a separate layer, leaving splitfile to simply manage the final IO across volumes.
Examples
import splitfile
with splitfile.open('data.bin', 'wb') as f:
f.write(b'Hello, World!')
import splitfile
import tarfile
with splitfile.open('data.bin', 'wb', volume_size=1000000) as f:
with tarfile.open(mode='w', fileobj=f) as t:
for file in files:
t.add(file)
Result:
data.bin
data.bin.2
data.bin.3
...
Dependencies
Standard library only
Installation
pip install splitfile
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
splitfile-2.0.1.tar.gz
(6.0 kB
view hashes)
Built Distribution
splitfile-2.0.1-py3-none-any.whl
(18.0 kB
view hashes)
Close
Hashes for splitfile-2.0.1-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | f1d4dba1cdf0a637004d3e30b5b8f343d57f548cda8eec412787a01672950bd4 |
|
MD5 | 3e6c6a22266384d09d71c79c833ec184 |
|
BLAKE2b-256 | 0de2ca21ff8d9d77641574be35ccd1a31d3ff1e182b89727b243a526fff4bb38 |