def addCallback(function):

    def result(parameters, callback):
        result = function(parameters)
Thread(target=callback).start()
return result
return result

@addCallback
def echo(value):
    print(value)

def callback():
    pass
Designing an async API in Python