{"id":13936628,"url":"https://github.com/jpetrucciani/bucketstore","last_synced_at":"2025-05-15T20:02:24.654Z","repository":{"id":41501033,"uuid":"80177188","full_name":"jpetrucciani/bucketstore","owner":"jpetrucciani","description":"A simple library for interacting with Amazon S3. ","archived":false,"fork":false,"pushed_at":"2024-10-26T00:25:22.000Z","size":162,"stargazers_count":230,"open_issues_count":6,"forks_count":21,"subscribers_count":15,"default_branch":"main","last_synced_at":"2025-05-09T01:46:52.117Z","etag":null,"topics":["amazon-s3","aws","boto","boto3","for-humans","python","s3"],"latest_commit_sha":null,"homepage":"https://pypi.org/project/bucketstore","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/jpetrucciani.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2017-01-27T03:05:00.000Z","updated_at":"2025-02-26T10:39:51.000Z","dependencies_parsed_at":"2025-03-18T01:39:49.697Z","dependency_job_id":"a3618378-69ff-4f0c-b760-996425ace476","html_url":"https://github.com/jpetrucciani/bucketstore","commit_stats":null,"previous_names":[],"tags_count":7,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jpetrucciani%2Fbucketstore","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jpetrucciani%2Fbucketstore/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jpetrucciani%2Fbucketstore/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jpetrucciani%2Fbucketstore/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/jpetrucciani","download_url":"https://codeload.github.com/jpetrucciani/bucketstore/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":254414477,"owners_count":22067270,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["amazon-s3","aws","boto","boto3","for-humans","python","s3"],"created_at":"2024-08-07T23:02:52.330Z","updated_at":"2025-05-15T20:02:23.264Z","avatar_url":"https://github.com/jpetrucciani.png","language":"Python","funding_links":[],"categories":["Python"],"sub_categories":[],"readme":"[![PyPI version](https://badge.fury.io/py/bucketstore.svg)](https://badge.fury.io/py/bucketstore)\n[![Code style: black](https://img.shields.io/badge/code%20style-black-000000.svg)](https://github.com/ambv/black)\n[![Python 3.10+ supported](https://img.shields.io/badge/python-3.10+-blue.svg)](https://www.python.org/downloads/release/python-3100/)\n\n**bucketstore** is a very simple Amazon S3 client, written in Python. It\naims to be much more straight-forward to use than boto3, and specializes\nonly in Amazon S3, ignoring the rest of the AWS ecosystem.\n\n# Features\n\n- Treats S3 Buckets as Key/Value stores.\n- Automatic support for `AWS_ACCESS_KEY_ID`, `AWS_SECRET_ACCESS_KEY`,\n  and `AWS_DEFAULT_REGION` environment variables.\n- Easily make keys (or entire buckets) publically accessable.\n- Easily get the public URL for a given key.\n- Generates temporary URLs for a given key.\n- Use S3 in a pythonic way\\!\n\n# Usage\n\n## Installation\n\n```bash\npip install bucketstore\n```\n\n## Get (or create) a bucket, easily:\n\n```python\nimport bucketstore\n\n# Create the bucket if it doesn't exist.\nbucket = bucketstore.get('bucketstore-playground', create=True)\n```\n\n## Treat the bucket like a key/value store:\n\n```pycon\n\u003e\u003e\u003e bucket\n\u003cS3Bucket name='bucketstore-playground'\u003e\n\n# get/set using array syntax\n\u003e\u003e\u003e bucket['foo'] = 'bar'\n\u003e\u003e\u003e bucket['foo']\nbar\n\n# get/set using methods\n\u003e\u003e\u003e bucket.set('foo2', 'bar2')\n\u003e\u003e\u003e bucket.get('foo2')\nbar2\n\n# list keys\n\u003e\u003e\u003e bucket.list()\n[u'foo', u'foo2']\n\n# all keys\n\u003e\u003e\u003e bucket.all()\n[\u003cS3Key name=u'foo' bucket='bucketstore-playground'\u003e, \u003cS3Key name=u'foo2' bucket='bucketstore-playground'\u003e]\n\n# check if a key exists in the bucket\n\u003e\u003e\u003e 'foo' in bucket\nTrue\n\n# delete keys in the bucket\n\u003e\u003e\u003e del bucket['foo2']\n{}\n```\n\n## Interact with S3 keys\n\n```pycon\n\u003e\u003e\u003e bucket.key('foo')\n\u003cS3Key bucket='bucketstore-playground' name=u'foo'\u003e\n\n\u003e\u003e\u003e foo = _\n\u003e\u003e\u003e foo.set('new value')\n\n# Generate a temporary share URL.\n\u003e\u003e\u003e foo.temp_url(duration=1200)\nu'https://bucketstore-playground.s3.amazonaws.com/foo?AWSAccessKeyId=AKIAI2RVFNXIW7WS66QQ\u0026Expires=1485493909\u0026Signature=L3gD9avwQZQO1i11dIJXUiZ7Nx8%3D'\n\n# Make key publically accessable.\n\u003e\u003e\u003e foo.make_public()\n\u003e\u003e\u003e foo.url\n'https://s3.amazonaws.com/bucketstore-playground/foo'\n\n# Get / set metadata for key.\n\u003e\u003e\u003e foo.meta = {'foo': 'bar'}\n\u003e\u003e\u003e foo.meta\n{'foo': 'bar}\n\n# Rename key to 'foo3'.\n\u003e\u003e\u003e foo.rename('foo3')\n\n# Delete the key.\n\u003e\u003e\u003e foo.delete()\n\n# Create a key with a content type\n\u003e\u003e\u003e foo = bucket.key('foo.html')\n\u003e\u003e\u003e foo.set('\u003ch1\u003ebar\u003c/h1\u003e', content_type='text/html')\n\n# upload to key\n\u003e\u003e\u003e bucket.key('test.py').upload('/tmp/test.py')\n\n# or upload with a file-like object! (make sure it's open in binary mode)\n\u003e\u003e\u003e with open('/tmp/test.py', 'rb') as file:\n\u003e\u003e\u003e     bucket.key('test.py').upload(file)\n\n# download to file\n\u003e\u003e\u003e bucket.key('test.py').download('/tmp/test.py')\n\n# or download to a file-like object! (make sure it's open in binary mode)\n\u003e\u003e\u003e with open('/tmp/test.py', 'wb') as file:\n\u003e\u003e\u003e     bucket.key('test.py').download(file)\n\n# size of key\n\u003e\u003e\u003e bucket.key('test.py').size()\n\u003e\u003e\u003e len(bucket.key('test.py'))\n15\n```\n\nOther methods include `bucketstore.login(access_key_id, secret_access_key)`, `bucketstore.list()`, and\n`bucketstore.get(bucket_name, create=False)`.\n\n# Tests\n\nTests are run through [Tox](https://tox.readthedocs.io/en/latest/).\n\n```shell\n\n```\n\n✨🍰✨\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjpetrucciani%2Fbucketstore","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjpetrucciani%2Fbucketstore","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjpetrucciani%2Fbucketstore/lists"}