jpetrucciani / Bucketstore
Licence: mit
A simple library for interacting with Amazon S3.
Stars: ✭ 209
Programming Languages
python
139335 projects - #7 most used programming language
Projects that are alternatives of or similar to Bucketstore
Serverless S3 Sync
A plugin to sync local directories and S3 prefixes for Serverless Framework ⚡️
Stars: ✭ 126 (-39.71%)
Mutual labels: aws, s3
Kafka Connect Storage Cloud
Kafka Connect suite of connectors for Cloud storage (Amazon S3)
Stars: ✭ 153 (-26.79%)
Mutual labels: aws, s3
Terraform Aws S3 Bucket
Terraform module which creates S3 bucket resources on AWS
Stars: ✭ 130 (-37.8%)
Mutual labels: aws, s3
Aws Mobile React Native Starter
AWS Mobile React Native Starter App https://aws.amazon.com/mobile
Stars: ✭ 2,247 (+975.12%)
Mutual labels: aws, s3
Deploy Strapi On Aws
Deploying a Strapi API on AWS (EC2 & RDS & S3)
Stars: ✭ 121 (-42.11%)
Mutual labels: aws, s3
0x4447 product s3 email
📫 A serverless email server on AWS using S3 and SES
Stars: ✭ 2,905 (+1289.95%)
Mutual labels: aws, s3
Docker S3 Volume
Docker container with a data volume from s3.
Stars: ✭ 166 (-20.57%)
Mutual labels: aws, s3
Terraform Aws Cloudfront S3 Cdn
Terraform module to easily provision CloudFront CDN backed by an S3 origin
Stars: ✭ 162 (-22.49%)
Mutual labels: aws, s3
Node Acme Lambda
Use AWS Lambda to manage SSL certificates for ACME providers like Let's Encrypt.
Stars: ✭ 120 (-42.58%)
Mutual labels: aws, s3
Serverless Architectures Aws
The code repository for the Serverless Architectures on AWS book
Stars: ✭ 120 (-42.58%)
Mutual labels: aws, s3
Cash
HTTP response caching for Koa. Supports Redis, in-memory store, and more!
Stars: ✭ 122 (-41.63%)
Mutual labels: aws, s3
Website
⚡️ Instantly deploy static website on serverless infrastructure with zero configuration using Serverless Components.
Stars: ✭ 118 (-43.54%)
Mutual labels: aws, s3
Scar
Deploy static websites in seconds - with HTTPS, a global CDN, and custom domains.
Stars: ✭ 1,715 (+720.57%)
Mutual labels: aws, s3
Amazon S3 Find And Forget
Amazon S3 Find and Forget is a solution to handle data erasure requests from data lakes stored on Amazon S3, for example, pursuant to the European General Data Protection Regulation (GDPR)
Stars: ✭ 115 (-44.98%)
Mutual labels: aws, s3
Lad
👦 Lad is the best Node.js framework. Made by a former Express TC and Koa team member.
Stars: ✭ 2,112 (+910.53%)
Mutual labels: aws, s3
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.
- Automatic support for
AWS_ACCESS_KEY_ID
,AWS_SECRET_ACCESS_KEY
, andAWS_DEFAULT_REGION
environment variables. - Easily make keys (or entire buckets) publically accessable.
- Easily get the public URL for a given key.
- Generates temporary URLs for a given key.
- Use S3 in a pythonic way!
Usage
Installation
$ pip install bucketstore
Get (or create) a bucket, easily:
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
<S3Bucket name='bucketstore-playground'>
# get/set using array syntax
>>> bucket['foo'] = 'bar'
>>> bucket['foo']
bar
# get/set using methods
>>> bucket.set('foo2', 'bar2')
>>> bucket.get('foo2')
bar2
# list keys
>>> bucket.list()
[u'foo', u'foo2']
# all keys
>>> bucket.all()
[<S3Key name=u'foo' bucket='bucketstore-playground'>, <S3Key name=u'foo2' bucket='bucketstore-playground'>]
# check if a key exists in the bucket
>>> 'foo' in bucket
True
# delete keys in the bucket
>>> del bucket['foo2']
{}
Interact with S3 keys:
>>> bucket.key('foo')
<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 key publically accessable.
>>> foo.make_public()
>>> foo.url
'https://s3.amazonaws.com/bucketstore-playground/foo'
# Get / set metadata for key.
>>> foo.meta = {'foo': 'bar'}
>>> foo.meta
{'foo': 'bar}
# Rename key to 'foo3'.
>>> foo.rename('foo3')
# Delete the key.
>>> foo.delete()
# Create a key with a content type
>>> foo = bucket.key('foo.html')
>>> foo.set('<h1>bar</h1>', content_type='text/html')
# upload to key
>>> bucket.key('test.py').upload('/tmp/test.py')
# or upload with a file-like object! (make sure it's open in binary mode)
>>> with open('/tmp/test.py', 'rb') as file:
>>> bucket.key('test.py').upload(file)
# download to file
>>> bucket.key('test.py').download('/tmp/test.py')
# or download to a file-like object! (make sure it's open in binary mode)
>>> with open('/tmp/test.py', 'wb') as file:
>>> bucket.key('test.py').download(file)
# size of key
>>> bucket.key('test.py').size()
>>> len(bucket.key('test.py'))
15
Other methods include bucketstore.login(access_key_id, secret_access_key)
, bucketstore.list()
, and
bucketstore.get(bucket_name, create=False)
.
Tests
Tests are run through Tox.
# Run tests against all environments.
$ tox
# Run against a specific version.
$ tox -e py36
# Run with pytest arguments.
$ tox -- --pdb
✨🍰✨
Note that the project description data, including the texts, logos, images, and/or trademarks,
for each open source project belongs to its rightful owner.
If you wish to add or remove any projects, please contact us at [email protected].