leaf_engine.utils.s3 ==================== .. py:module:: leaf_engine.utils.s3 Functions --------- .. autoapisummary:: leaf_engine.utils.s3.delete_object leaf_engine.utils.s3.get_presigned_url Module Contents --------------- .. py:function:: delete_object(key: str, bucket: str | None = None) -> None Delete S3 object. :param key: Object key. :type key: str :param bucket: Bucket where object is stored. Defaults to ANALYTICS_DATA_BUCKET. :type bucket: str, optional .. py:function:: get_presigned_url(key: str, bucket: str | None = None, expires_in_seconds: int = 900) -> str Return presigned URL for S3 object. Enables clients without AWS credentials to read S3 objects - URLs should be shared with trusted clients only (e.g., graph DB). :param key: Object key. :type key: str :param bucket: Bucket where object is stored. Defaults to ANALYTICS_DATA_BUCKET. :type bucket: str, optional :param expires_in_seconds: How long the URL is valid for (in seconds). Defaults to 900 (15 minutes). :type expires_in_seconds: int, optional :returns: Object presigned URL. :rtype: str