code: def get_jsapi_card_ticket(self):
          
          jsapi_card_ticket_key = '{0}_jsapi_card_ticket'.format(self.appid)
          jsapi_card_ticket_expire_at_key = '{0}_jsapi_card_ticket_expires_at'.format(self.appid)
  
          ticket = self.session.get(jsapi_card_ticket_key)
          expires_at = self.session.get(jsapi_card_ticket_expire_at_key, 0)
          if not ticket or int(expires_at) < int(time.time()):
              ticket_response = self.get_ticket('wx_card')
              ticket = ticket_response['ticket']
              expires_at = int(time.time()) + int(ticket_response['expires_in'])
              self.session.set(jsapi_card_ticket_key, ticket)
              self.session.set(jsapi_card_ticket_expire_at_key, expires_at)
          return ticket
docs: 获取 api_ticket：是用于调用微信卡券JS API的临时票据，有效期为7200 秒，通过access_token 来获取。
          微信文档地址：http://mp.weixin.qq.com/wiki/7/aaa137b55fb2e0456bf8dd9148dd613f.html
          该方法会通过 session 对象自动缓存管理 ticket
  
          :return: ticket