Coder Social home page Coder Social logo

s3_stream's Introduction

####Motivation: s3cmd and aws-cli tools do not calculate etag value for your download. If either errors out, you will have a partially truncated file and possibly something in stderr. If you’re running large jobs (i.e., accessing 10s of thousands of objects) and you’re accessing them as a stream (i.e., everything in memory), it will be easy to miss these errors. This script calculates etag and checksum on the file stream directly, producing .etag and .md5 files for the s3 object. It also compares the calculated etag against Amazon’s etag for ensuring consistency.

####Features:

  • makes requests of s3 API in chunks, with the chunksize based on the number of parts the object has (typically 15 Mb each),
  • hashes each chunk in order to reproduce the amazon etag value,
  • hashes the full stream to generate the file’s md5 checksum,
  • downloads the file with (-o, --output-file),
  • streams the file (with - or –stdin).

####Requirements:

  • Besides needing some extra python modules (boto, progressbar, -- the rest come with Python I think).
  • You will need a .boto file in your home directory, with your aws keys.

####Could use some additional improvements: #####FIXME:

  • Fix retry mechanism for handling errors when making requests of the API

s3_stream's People

Contributors

obenshaindw avatar

Stargazers

 avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.