Skip to main content

FileChunkIO represents a chunk of an OS-level file containing bytes data

Project description

# FileChunkIO 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 `python >>> 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 OR\nIMPLIED, 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 OR\n' `

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

filechunkio-1.7.tar.gz (2.8 kB view details)

Uploaded Source

File details

Details for the file filechunkio-1.7.tar.gz.

File metadata

  • Download URL: filechunkio-1.7.tar.gz
  • Upload date:
  • Size: 2.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No

File hashes

Hashes for filechunkio-1.7.tar.gz
Algorithm Hash digest
SHA256 c30c99b6c04d28c62118bfcc94a5fecb3e7662e6b1f3d3ffe07694f05d7d7f3e
MD5 a1fe737d7504748132907ea0e054100f
BLAKE2b-256 3fc20669642799fd6a9da5cb0f3f264fce20602d8e8e53ec829cbac55470156f

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page