pytoolbox.aws.s3 module

pytoolbox.aws.s3.copy_object(s3, bucket_name, source_key, target_key)[source]
pytoolbox.aws.s3.get_bucket_location(s3, bucket_name)[source]
pytoolbox.aws.s3.get_object_url(bucket_name, location, key)[source]
pytoolbox.aws.s3.list_objects(s3, bucket_name, prefix='', patterns='*', regex=False)[source]
pytoolbox.aws.s3.load_object_meta(s3, bucket_name, path, fail=True)[source]
pytoolbox.aws.s3.read_object(s3, bucket_name, path, file=None, fail=True)[source]
pytoolbox.aws.s3.remove_objects(s3, bucket_name, prefix='', patterns='*', callback=<function <lambda>>, regex=False, simulate=False)[source]

Remove objects matching pattern, by chunks of 1000 to be efficient.

  • Set callback to a function returning True if given object has to be removed.

pytoolbox.aws.s3.write_object(s3, bucket_name, path, file)[source]