import hmacimport hashlibdef get_hmacsha256(key, message): key_bytes = bytes(key, 'utf-8') message_bytes = bytes(message, 'utf-8') hmacsha256_str = hmac.new(key_bytes, message_bytes, digestmod=hashlib.sha256).hexdigest() return hmacsha256_str