Popular Python recipes tagged "s3"http://code.activestate.com/recipes/langs/python/tags/s3/2014-11-06T18:31:44-08:00ActiveState Code RecipesUrllib handler for Amazon S3 buckets (Python) 2014-11-06T18:31:44-08:00Andrea Corbellinihttp://code.activestate.com/recipes/users/4186880/http://code.activestate.com/recipes/578957-urllib-handler-for-amazon-s3-buckets/ <p style="color: grey"> Python recipe 578957 by <a href="/recipes/users/4186880/">Andrea Corbellini</a> (<a href="/recipes/tags/aws/">aws</a>, <a href="/recipes/tags/s3/">s3</a>, <a href="/recipes/tags/urllib/">urllib</a>). </p> <p>This is a handler for the standard <a href="https://docs.python.org/dev/library/urllib.request.html">urllib.request</a> module capable of opening buckets stored on <a href="http://aws.amazon.com/s3/">Amazon S3</a>.</p> <p>Here is an usage example:</p> <pre class="prettyprint"><code>&gt;&gt;&gt; from urllib.request import build_opener &gt;&gt;&gt; opener = build_opener(S3Handler) &gt;&gt;&gt; response = opener.open('s3://bucket-name/key-name') &gt;&gt;&gt; response.read() b'contents' </code></pre> Nautilus script to push files to S3 in python (Python) 2012-04-10T21:41:48-07:00coleifer@gmail.comhttp://code.activestate.com/recipes/users/4181659/http://code.activestate.com/recipes/578102-nautilus-script-to-push-files-to-s3-in-python/ <p style="color: grey"> Python recipe 578102 by <a href="/recipes/users/4181659/">coleifer@gmail.com</a> (<a href="/recipes/tags/boto/">boto</a>, <a href="/recipes/tags/nautilus/">nautilus</a>, <a href="/recipes/tags/s3/">s3</a>). </p> <p>A small script that allows you to push files and directories to S3 using a context menu in nautilus file browser.</p> <p>Add this script to <code>~/.gnome2/nautilus-scripts/</code> and be sure it is executable. Requires <a href="http://boto.readthedocs.org/">boto</a>, the python aws library. Credentials by default are looked up from ~/.boto but can be supplied in the get_s3_conn() function.</p>