Click button after n interval do something

I want to develop a button after I clicked it, after 5 seconds it will do the command that I code.
how can I do that?

I tried using dcc.Interval and it does not the job

You can just use the time module to pause the code for a fixed number of seconds ( time.sleep(n) will pause your code for n seconds before the next line executes:

import time


  Output('some-output', 'value'),
  [Input('some-input', 'value')]
def delayed_callback(input):
  time.sleep(5)  #wait 5 seconds
  # Code to do something
  return output