python rewrite with s3 backing support.

Fixes #1 #3 #4