use template to genrate client.py code