django_penS3 API

A custom Storage interface for storing files to S3 via OpenS3

class django_openS3.storage.S3Storage(name_prefix, bucket, aws_access_key, aws_secret_key)[source]

A custom storage implementation for use with py3s3. An instance of this class can be used to move a py3s3 file up to or down from AWS.

delete(name)[source]

Deletes the specified file from the storage system.

exists(name)[source]

Returns True if a file referenced by the given name already exists in the storage system, or False if the name is available for a new file.

listdir(path)[source]

Lists the contents of the specified path, returning a 2-tuple of lists; the first item being directories, the second item being files.

modified_time(name)[source]

Returns the last modified time (as datetime object) of the file specified by name.

size(name)[source]

Returns the total size, in bytes, of the file specified by name.

url(name)[source]

Returns an absolute URL where the file’s contents can be accessed directly by a Web browser.

Previous topic

django_openS3

Next topic

Changelog

This Page