demo code of flask ktz