Skip to main content

Handle Amazon S3 PUT/DELETE/sign interactions

Project description

Objects / files can be put in S3 and deleted from S3. Also signed URLs can be generated to allow limited-time access to a particular object in an S3 bucket.

Requires Python 2.6 or above.

Available as Python package at http://pypi.python.org/pypi/pyawsbuckets [ pip install pyawsbuckets ] Source at https://github.com/mhenwood/pyawsbuckets

Usage

Initiate the access object with your credentials:

from pyawsbuckets import AwsInterface
aws_interface = AwsInterface(amazon_access_key, amazon_secret_key)

Put an object into an existing bucket at S3 (repeat: the bucket must ALREADY exist):

aws_interface.put('https', 'bucket999', 'somefile.pdf', content)

Delete an object from S3:

aws_interface.delete('bucket999', 'somefile.pdf')

Get a signed URL which gives access to a private object, but only for (e.g.) 15 minutes:

expiring_url = aws_interface.sign_object_request('https', 'bucket999', 'somefile.pdf', 15)

Project details


Download files

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

Source Distributions

No source distribution files available for this release.See tutorial on generating distribution archives.

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

pyawsbuckets-1.0.5-py2.6.egg (9.2 kB view details)

Uploaded Egg

File details

Details for the file pyawsbuckets-1.0.5-py2.6.egg.

File metadata

File hashes

Hashes for pyawsbuckets-1.0.5-py2.6.egg
Algorithm Hash digest
SHA256 b88cb33c56b98c7e61e03d5a093df838f8e2c3e423134ba6c892b091f8c10047
MD5 30f57e797024c6dc520d79d063a51a14
BLAKE2b-256 38dcf819f5ac5f26fd06d2b7b09b54c934832a597db6387964d80887cb55f6ba

See more details on using hashes here.

Supported by

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