Skip to main content
Help us improve PyPI by participating in user testing. All experience levels needed!

Local cache of S3 buckets

Project description

Build Status Code Coverage Issue Count

S3 Cache for Python

Niall McCarroll wrote a neat little AWS S3 cache on his blog that I found really useful, but could not find on PyPI, so here it is in a refactored form as a public service.

Instructions

from s3cache import S3Cache

s3 = S3Cache("/tmp", "t13d-misc")
s3.connect()
s3.create_bucket()
assert(s3.bucket_exists())

s3.set_verbosity(True)
s3.set_caching(True)

f = s3.open("/tmp/world.txt", "w")
f.write("Hello")
f.close()

f = s3.open("/tmp/world.txt", "a")
f.write(" World")
f.close()

f2 = s3.open("/tmp/world.txt", "r")
f2.close()

assert(s3.object_exists("/tmp/world.txt"))
s3.remove_object("/tmp/world.txt")

Project details


Release history Release notifications

This version
History Node

0.1.1

History Node

0.1.0

History Node

0.1.0rc3

History Node

0.1.0rc2

History Node

0.1.0rc1

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Filename, size & hash SHA256 hash help File type Python version Upload date
s3cache-0.1.1.tar.gz (4.9 kB) Copy SHA256 hash SHA256 Source None Sep 12, 2016

Supported by

Elastic Elastic Search Pingdom Pingdom Monitoring Google Google BigQuery Sentry Sentry Error logging CloudAMQP CloudAMQP RabbitMQ AWS AWS Cloud computing Fastly Fastly CDN DigiCert DigiCert EV certificate StatusPage StatusPage Status page