File like object that splits data across volumes
Project description
splitfile.py
Python file-like object that facilitates reading and writing of binary data split across multiple volumes (files) of a specified size. Includes support for compression and encryption. Sequential read/write methods only.
Can be used with modules such as tarfile, enabling read/write of compressed, encrypted, and split tar archives (use 'w|' and 'r|' tarfile stream modes).
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, compression=True,
lzma_preset=9, aes_key=b'encryption-key') 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
PyCryptodome for AES
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-1.1.1.tar.gz
(4.2 kB
view hashes)
Built Distribution
splitfile-1.1.1-py3-none-any.whl
(16.7 kB
view hashes)
Close
Hashes for splitfile-1.1.1-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 3881f74df28cab38c00b225a88a29b1d4eb1c831cfbb4f893281013293de7550 |
|
MD5 | bdb1766d9ce1841af82d63bf954a2543 |
|
BLAKE2b-256 | 693cd708c400c5bc580a2d8a7ac6f32bf0290c89d7cf472384dc8b79adf1fdb9 |