gerar hash hmach sha256 em python

import hmac
import hashlib

hmac.new(secret.encode(), data_str.encode(), hashlib.sha256).hexdigest()
Muhammad Zubair