androlyze.storage.s3 package¶
Submodules¶
androlyze.storage.s3.S3Storage module¶
-
class
androlyze.storage.s3.S3Storage.S3Storage(aws_id, aws_key, aws_bucket_name, s3_hostname=None)[source]¶ Bases:
object,androlyze.storage.apk.ApkCopyInterface.ApkCopyInterfaceAttributes
Methods
-
apk_bucket¶ Bucket: APK bucket
-
apk_bucket_name¶ str: Name of the APK bucket
-
bucket_create(key, val, metadata_dict={})[source]¶ Create an object in the bucket, but only if not yet present (save traffic).
key : str val : file-like object metadata_dict : dict
Returns: Key
-
bucket_get(key)[source]¶ Get a Key object from S3 with the given key.
Parameters: key: str
Identifier of the object in the bucket
Returns: Key
-
copy_apk(apk, file_like_obj, **kwargs)[source]¶ See doc of
ApkCopyInterface.copy_apk().Copy the apk into the S3 storage.
Returns: boto.s3.key.Key
The stored object.
-
static
fmt_metadata(metadata)[source]¶ Escape the dictionary suitable for boto.
Parameters: metadata : dict
-
get_apk(_hash, apk=None, **kwargs)[source]¶ Get the EAndroApk from _hash.
Parameters: _hash : str
Hash of the .apk (sha256)
apk : Apk
Carries metainformation needed to build the whole path to the element in S3.
Returns: EAndroApk
Apk constructed from raw data and meta infos.
Raises: S3StorageLoadException
-
static
get_s3_id(apk)[source]¶ Parameters: apk : Apk
Returns: str
The id for the apk in the S3 storage
-
s3_conn¶ S3Connection : Connection to Amazon S3
-