Module zes3t :: Class S3Client
[show private | hide private]
[frames | no frames]

Class S3Client


Amazon S3 AWS proxy client.

See Also: http://docs.amazonwebservices.com/AmazonS3/2006-03-01/SOAPAPI.html

Method Summary
S3Client __init__(self, aws_access_key_id, aws_secret_access_key, url)
CopyObjectResult CopyObject(self, SourceBucket, SourceKey, DestinationBucket, DestinationKey, **kwargs)
Create a copy of an object.
CreateBucketResult CreateBucket(self, Bucket, **kwargs)
Create a bucket.
Status DeleteBucket(self, Bucket, **kwargs)
Delete a bucket.
Status DeleteObject(self, Bucket, Key)
Delete an object.
GetObjectResult GetObject(self, Bucket, Key, GetMetadata, GetData, **kwargs)
Basic operation for retrieving an object stored in Amazon S3.
file GetObjectAsFile(self, Bucket, Key, File, GetMetadata, GetData, **kwargs)
Retrieve an object stored in Amazon S3 and save it to a local file.
[Bucket] ListAllMyBuckets(self)
Get list of all buckets owned by the sender of the request.
[Content] ListBucket(self, Bucket, **kwargs)
Get information about some of the items in the bucket.
PutObjectInlineResult PutObject(self, Bucket, Key, Data, **kwargs)
Add an object to a bucket.
PubObjectInlineResult PutObjectAsFile(self, File, Bucket, Key, **kwargs)
Add an object to a bucket from a local file.

Class Variable Summary
str AWS_WSDL_URL = 'http://doc.s3.amazonaws.com/2006-03-01/A...

Instance Method Details

__init__(self, aws_access_key_id=None, aws_secret_access_key=None, url='http://doc.s3.amazonaws.com/2006-03-01/AmazonS3.wsdl')
(Constructor)

Parameters:
aws_access_key_id -
aws_secret_access_key -
url -
Returns:
S3Client

CopyObject(self, SourceBucket, SourceKey, DestinationBucket, DestinationKey, **kwargs)

Create a copy of an object.
Parameters:
SourceBucket -
SourceKey -
DestinationBucket -
DestinationKey -
Keyword Parameters:
MetadataDirective - 'COPY' (default) or 'REPLACE'
Metadata -
AccessControlList -
CopySourceIfMatch -
CopySourceIfNoneMatch -
CopySourceIfUnmodifiedSince -
CopySourceIfModifiedSince -
Returns:
CopyObjectResult
Raises:
S3Error -

See Also: http://docs.amazonwebservices.com/AmazonS3/2006-03-01/SOAPCopyObject.html

CreateBucket(self, Bucket, **kwargs)

Create a bucket.
Parameters:
Bucket -
Keyword Parameters:
AccessControlList -
           (type=AccessControlList)
Returns:
CreateBucketResult
Raises:
S3Error -

See Also: http://docs.amazonwebservices.com/AmazonS3/2006-03-01/SOAPCreateBucket.html

DeleteBucket(self, Bucket, **kwargs)

Delete a bucket.
Parameters:
Bucket -
Returns:
Status
Raises:
S3Error -

See Also: http://docs.amazonwebservices.com/AmazonS3/2006-03-01/SOAPDeleteBucket.html

DeleteObject(self, Bucket, Key)

Delete an object.
Parameters:
Bucket -
Key -
Returns:
Status
Raises:
S3Error -

See Also: http://docs.amazonwebservices.com/AmazonS3/2006-03-01/SOAPDeleteObject.html

GetObject(self, Bucket, Key, GetMetadata=True, GetData=True, **kwargs)

Basic operation for retrieving an object stored in Amazon S3. Currently only supports files 1 MiB or smaller!
Parameters:
Bucket -
Key -
GetMetadata -
           (type=boolean)
GetData -
           (type=boolean)
Keyword Parameters:
Credential -
Returns:
GetObjectResult
Raises:
S3Error -

See Also: http://docs.amazonwebservices.com/AmazonS3/2006-03-01/SOAPGetObject.html

GetObjectAsFile(self, Bucket, Key, File=None, GetMetadata=True, GetData=True, **kwargs)

Retrieve an object stored in Amazon S3 and save it to a local file. Note that if the specified local file already exists, it will be clobbered. Currently only supports files 1 MiB or smaller!
Parameters:
Bucket -
Key -
File - a file object or filename, Key will be used if not specified
GetMetadata -
           (type=boolean)
GetData -
           (type=boolean)
Keyword Parameters:
Credential -
Returns:
file
Raises:
S3Error -
IOError -

See Also: http://docs.amazonwebservices.com/AmazonS3/2006-03-01/SOAPGetObject.html

ListAllMyBuckets(self)

Get list of all buckets owned by the sender of the request.
Returns:
[Bucket]
Raises:
S3Error -

See Also: http://docs.amazonwebservices.com/AmazonS3/2006-03-01/SOAPListAllMyBuckets.html

ListBucket(self, Bucket, **kwargs)

Get information about some of the items in the bucket.
Parameters:
Bucket -
Keyword Parameters:
Prefix -
Marker -
MaxKeys -
           (type=int)
Delimiter -
Credential -
Returns:
[Content]
Raises:
S3Error -

See Also: http://docs.amazonwebservices.com/AmazonS3/2006-03-01/SOAPListBucket.html

PutObject(self, Bucket, Key, Data, **kwargs)

Add an object to a bucket. Currently only supports files 1 MiB or smaller!
Parameters:
Bucket -
Key -
Data - byte str
Keyword Parameters:
Metadata -
AccessControlList -
Returns:
PutObjectInlineResult
Raises:
S3Error -

See Also: http://docs.amazonwebservices.com/AmazonS3/2006-03-01/SOAPPutObjectInline.html

PutObjectAsFile(self, File, Bucket, Key=None, **kwargs)

Add an object to a bucket from a local file. Currently only supports files 1 MiB or smaller!
Parameters:
File -
Bucket -
Key -
Keyword Parameters:
Metadata -
AccessControlList -
Returns:
PubObjectInlineResult
Raises:
S3Error -

See Also: http://docs.amazonwebservices.com/AmazonS3/2006-03-01/SOAPPutObjectInline.html


Class Variable Details

AWS_WSDL_URL

Type:
str
Value:
'http://doc.s3.amazonaws.com/2006-03-01/AmazonS3.wsdl'                 

Generated by Epydoc 2.1 on Tue Dec 9 18:32:17 2008 http://epydoc.sf.net