django_penS3 API — django_openS3 0.1.0 documentation

### Navigation

- index
- modules |
- next |
- previous |
- django_openS3 0.1.0 documentation »

# 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)

  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)

    Deletes the specified file from the storage system.

  `exists`(name)

    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)

    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)

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

  `size`(name)

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

  `url`(name)

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

### Navigation

- index
- modules |
- next |
- previous |
- django_openS3 0.1.0 documentation »