Python Persistent Logic Engine