title: How can i import keccak with python3?
body: <p>i am trying to run the following python3 script however i am struggling to get keccak working:</p>
  <pre><code>import sha3
  import requests
  import time
  
  
  
  SAFE_ADDRESS = '0x***'
  OWNER_PRIVATE_KEY = '****'
  DELEGATE_ADDRESS = '****'
  TX_SERVICE_BASE_URL = 'https://safe-transaction.rinkeby.gnosis.io'
  
  
  totp = int(time.time()) // 3600
  hash_to_sign = keccak(text=DELEGATE_ADDRESS + str(totp))
  account = Account.from_key(OWNER_PRIVATE_KEY)
  signature = account.signHash(hash_to_sign)
  
  add_payload = {
      &quot;safe&quot;: SAFE_ADDRESS,
      &quot;delegate&quot;: DELEGATE_ADDRESS,
      &quot;signature&quot;: signature.signature.hex(),
      &quot;label&quot;: &quot;My new delegate2&quot;
  }
  
  add_response = requests.post(f'{TX_SERVICE_BASE_URL}/api/v1/safes/{SAFE_ADDRESS}/delegates/', json=add_payload, headers = {'Content-type': 'application/json'})
  
  print(add_response.text)
  print(add_response.status_code)
  </code></pre>
  <p>i get the following error:</p>
  <pre><code>Traceback (most recent call last):
    File &quot;test.py&quot;, line 14, in &lt;module&gt;
      hash_to_sign = keccak(text=DELEGATE_ADDRESS + str(totp))
  NameError: name 'keccak' is not defined
  </code></pre>
  <p>additionally i have tried to replace <code>import sha3</code> with <code>from Crypto.Hash import keccak</code>
  but this time i get this error:</p>
  <pre><code>Traceback (most recent call last):
    File &quot;test.py&quot;, line 14, in &lt;module&gt;
      hash_to_sign = keccak(text=DELEGATE_ADDRESS + str(totp))
  TypeError: 'module' object is not callable
  </code></pre>
  <p>how can i fix this?</p>