Module trase.tools.aws.tracker
Global variables
var S3_OBJECTS_ACCESSED_IN_CURRENT_SESSION-
A singleton intended to store all of the S3 objects accessed during the current Python session. It is of type
S3ObjectTracker.
Functions
def add_object_to_tracker(key, bucket, version_id=None, client=None)-
Add the S3 object to the list of all S3 objects accessed in the current Python session.
If
version_idis not supplied butclientis, we will (attempt) to fetch the latest version ID for the object.
Classes
class S3Object (key: str, bucket: str, version_id: Optional[str] = None)-
The location of an S3 object
Class variables
var bucket : strvar key : strvar typevar version_id : Optional[str]
class S3ObjectTracker (*args, **kwargs)-
This is a simple store of S3 objects. It inherits from a Python set, to ensure that entries are not duplicated. This behaviour relies on the
S3Objectclass to have a hash: this is the case because that class usesfrozen=True.Ancestors
- builtins.set
Methods
def add(self, key, bucket, version_id=None)-
Add an element to a set.
This has no effect if the element is already present.