Skip to main content

Get HMAC Signature

Description​

Gets HMAC signature.

Function Signature:​

def get_hmac_signature(secret_key: str, method: str, path: str, headers: Dict[str, str] = {}, parameters: Dict[str, str] = {}, body: str = '') -> tuple[str, str]:

Parameters​

  • secret_key (str): Input value for secret_key.
  • method (str): HTTP method (GET, POST, etc.).
  • path (str): Request path (relative to base URL).
  • headers (Dict[str, str]): HTTP headers for the request.
  • parameters (Dict[str, str]): Query-string parameters for the request.
  • body (str): Request body as a string.

Returns​

  • tuple[str, str]: Return value from the function.

Example Usage​

# Example usage
secret_key = "example"
method = "example"
path = "example"
headers = "example"
parameters = "example"
body = "example"
result = get_hmac_signature(secret_key, method, path, headers, parameters, body)
print(result)

Behavior​

  • Executes the function logic with the provided arguments.
  • On success, returns the computed value or result object.

Error Handling​

  • Exceptions are handled within the function where implemented.