FileChunkIO represents a chunk of an OS-level file containing bytes data
Project description
FileChunkIO represents a chunk of an OS-level file containing bytes data. Python 2.6+ is required.
BACKGROUND: I wrote FileChunkIO to upload huge files to Amazon S3 in multiple parts without having to split them physically upfront (which requires more time and twice the disk space) or creating in-memory chunks as StringIO instances.
EXAMPLE: >>> from filechunkio import FileChunkIO >>> chunk = FileChunkIO(‘LICENCE’, offset=646, bytes=201) >>> chunk.read() ‘THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS ORnIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.’ >>> chunk.tell() 201L >>> chunk.seek(4) >>> chunk.read(8) ‘SOFTWARE’ >>> chunk.seek(0) >>> chunk.readline() ‘THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS ORn’
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
File details
Details for the file filechunkio-1.5.tar.gz
.
File metadata
- Download URL: filechunkio-1.5.tar.gz
- Upload date:
- Size: 2.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 882ad497d2ed6dc2cc76e6c2a0ec71ea3df5f33ce69bd87f311d6f59d023b473 |
|
MD5 | bdc8507116dc32c7f140ff76cfd09ecc |
|
BLAKE2b-256 | fc2f549f11e6c8c8989e8519fac338b21c8db7970c1ffa5240c9eb361ce947b5 |