You could simplify this logic with:

self.rowkey = str(item.get('rowkey', uuid.uuid4()))