Package starcluster :: Module awsutils :: Class EasyS3
[hide private]
[frames] | no frames]

Class EasyS3

source code


Instance Methods [hide private]
 
__init__(self, aws_access_key_id, aws_secret_access_key, aws_s3_path='/', aws_port=None, aws_is_secure=True, aws_s3_host='s3.amazonaws.com', cache=False, **kwargs)
Create an EasyAWS object.
source code
 
__repr__(self)
repr(x)
source code
 
__check_for_auth_failure(self, e) source code
 
create_bucket(self, bucket_name)
Create a new bucket on S3.
source code
 
bucket_exists(self, bucket_name)
Check if bucket_name exists on S3
source code
 
get_bucket_or_none(self, bucket_name)
Returns bucket object representing S3 bucket Returns None if unsuccessful
source code
 
get_bucket(self, bucketname)
Returns bucket object representing S3 bucket
source code
 
list_bucket(self, bucketname) source code
 
get_buckets(self) source code
 
list_buckets(self) source code
 
get_bucket_files(self, bucketname) source code

Inherited from EasyAWS: reload

Inherited from object: __delattr__, __format__, __getattribute__, __hash__, __new__, __reduce__, __reduce_ex__, __setattr__, __sizeof__, __str__, __subclasshook__

Class Variables [hide private]
  DefaultHost = 's3.amazonaws.com'
  _calling_format = boto.s3.connection.OrdinaryCallingFormat()
Properties [hide private]

Inherited from EasyAWS: conn

Inherited from object: __class__

Method Details [hide private]

__init__(self, aws_access_key_id, aws_secret_access_key, aws_s3_path='/', aws_port=None, aws_is_secure=True, aws_s3_host='s3.amazonaws.com', cache=False, **kwargs)
(Constructor)

source code 

Create an EasyAWS object.

Requires aws_access_key_id/aws_secret_access_key from an Amazon Web Services (AWS) account and a connection_authenticator function that returns an authenticated AWS connection object

Providing only the keys will default to using Amazon EC2

kwargs are passed to the connection_authenticator's constructor

Overrides: object.__init__
(inherited documentation)

__repr__(self)
(Representation operator)

source code 

repr(x)

Overrides: object.__repr__
(inherited documentation)

create_bucket(self, bucket_name)

source code 

Create a new bucket on S3. bucket_name must be unique, the bucket namespace is shared by all AWS users