An IPython magic that displays images stored in Amazon S3
Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
.gitignore
LICENSE
README.md
Vagrantfile
provision.sh
s3img_demo.png
s3img_magic.py
setup.cfg
setup.py

README.md

s3img-ipython-magic

An IPython magic that displays images stored in Amazon S3. I find this useful when running a notebook server on a transient resource (AWS, virtual machine, etc.).

Demo

Demo

Usage

  • The line magic %s3img s3_uri will display the image at the URI s3_uri in S3.

  • The line magic %s3img_save fig s3_uri will save the matplotlib figure fig to the URI s3_uri in S3.

  • For convenience, the line magic %s3img_base_uri will set the base S3 URI. All subsequent uses of S3 image magics will form URIs relative to the base URI. For example,

    %s3img_base_uri s3://base/
    %s3img image.png

    will attempt to load the image at s3://base/image.png.

Installation

To install, do pip install s3img-ipython-magic or %load_ext https://github.com/AustinRochford/s3img-ipython-magic/s3img_magic.py.

The only dependency (other that IPython) is boto.

Your AWS credentials will be read from the environment.

License

This code is distributed under the MIT License.