Hooks

class uranium.hooks.Hooks[source]

hooks are a way to add functions which run at specific phases of the build process.

the following phases are supported:

  • initialize, which is executed before the build starts
  • finalize, which is executed after the build stops

each function has the “build” object passed to it when executing.

def print_finished_message(build):
    print("finished!")

current_build.hooks["finalize"].append(print_finished_message)

def main(build):
    print("this will print finished right after I'm done!")