Use flask to generate lightswitch src.