Skip to content
Manuel83 edited this page Jun 25, 2017 · 2 revisions

If you just want to run some code once during startup you can extend CraftBeerPi with custom Initializers

from modules import cbpi

@cbpi.initalizer(order=100)
def init(cbpi):
    ## YOUR CODE GOES HERE
    pass

@cbpi.initalizer Parameter

  • order = Integer value to modify the execution order (optional)
Clone this wiki locally