You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

15 lines
317B

  1. """
  2. channel factory
  3. """
  4. from channel.wechat.wechat_channel import WechatChannel
  5. def create_channel(channel_type):
  6. """
  7. create a channel instance
  8. :param channel_type: channel type code
  9. :return: channel instance
  10. """
  11. if channel_type == 'wx':
  12. return WechatChannel()
  13. raise RuntimeError