AppsCake Python Rewrite