One possibility is a file.py that is called by your framework. The interface could be something like
def doth_match(*args):
return True # the predicate
def doeth_thou(*args):
# processing things
return {} # status object for example
The framework loops and checks the first function; if true, then execute the second function. And then break or continue for other rule files (or objects).There could be multiple files rule1.py, rule2.py, etc that check and do different things.