Skip to main content

A simple library for interacting with Amazon S3.

Project description

BucketStore is a very simple Amazon S3 client, written in Python. It aims to be much more straight-forward to use than boto3, and specializes only in Amazon S3, ignoring the rest of the AWS ecosystem.

Features

  • Treats S3 Buckets as Key/Value stores.

  • Expects AWS_ACCESS_KEY_ID and AWS_SECRET_ACCESS_KEY to be set.

  • Easily make keys (or entire buckets) publically accessable.

  • Easily get the public URL for a given key.

  • Generates temporary URLs for a given key.

Usage

import bucketstore

# Create the bucket if it doesn't exist.
bucket = bucketstore.get('bucketstore-playground', create=True)
# Treat the bucket like a key/value store.
>>> bucket['foo'] = 'bar'
>>> bucket['foo']
bar

>>> bucket.set('foo2', 'bar2')
>>> bucket.get('foo2')
bar2

>>> bucket.list()
[u'foo', u'foo2']

>>> bucket.all()
[<S3Key bucket='bucketstore-playground' name=u'foo'>, <S3Key bucket='bucketstore-playground' name=u'foo2'>]
>>> bucket.all()[0]
<S3Key bucket='bucketstore-playground' name=u'foo'>
>>> foo = _

>>> foo.set('new value')

# Generate a temporary share URL.
>>> foo.temp_url(duration=1200)
u'https://bucketstore-playground.s3.amazonaws.com/foo?AWSAccessKeyId=AKIAI2RVFNXIW7WS66QQ&Expires=1485493909&Signature=L3gD9avwQZQO1i11dIJXUiZ7Nx8%3D'

# Make publically accessable.
>>> foo.make_public()
>>> foo.url
'https://s3.amazonaws.com/bucketstore-playground/foo'

>>> foo.delete()

Project details


Download files

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

Source Distribution

bucketstore-0.1.0.tar.gz (3.1 kB view details)

Uploaded Source

Built Distribution

bucketstore-0.1.0-py2-none-any.whl (4.6 kB view details)

Uploaded Python 2

File details

Details for the file bucketstore-0.1.0.tar.gz.

File metadata

  • Download URL: bucketstore-0.1.0.tar.gz
  • Upload date:
  • Size: 3.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No

File hashes

Hashes for bucketstore-0.1.0.tar.gz
Algorithm Hash digest
SHA256 51b3dba38697e4296796a1397c59d12924b77701a63cd7415233b1ab862d80e1
MD5 b5a7488ea52961bec4ec0d0bfaa9dd80
BLAKE2b-256 104ce13cd018780486f93817d6dbea4c58a184da1b09f128f078fdc6a0233e27

See more details on using hashes here.

File details

Details for the file bucketstore-0.1.0-py2-none-any.whl.

File metadata

File hashes

Hashes for bucketstore-0.1.0-py2-none-any.whl
Algorithm Hash digest
SHA256 05d3847b1115c6316cb377913bc1ecfdc087ce7eb1cc29b6a29719bc5d2bc836
MD5 5b79c7e5179638964794e2e351c22d4c
BLAKE2b-256 d691638617358d0ac49343eb71d3615ba29feb7b2e225ed11cc4c275c35d03ba

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page