死磕itchat源码--目录结构

阅读itchat源码时,先弄清itchat的目录结构

itchat
│  config.py
│  content.py
│  core.py
│  log.py
│  returnvalues.py
│  utils.py
│  __init__.py
│
├─components
│      contact.py
│      hotreload.py
│      login.py
│      messages.py
│      register.py
│      __init__.py
│
└─storage
        messagequeue.py
        templates.py
        __init__.py

其中:

  • config.py:配置文件
  • content.py: 对应的内容对象类型
  • core.pyCore类定义了所有的接口,加载了component包中定义的类方法
  • log.py:定义了日志
  • returnvalues.py:将itchat的返回值转换成布尔值
  • utils.py:处理二维码,结构化数据,解析微信返回的数据
  • component:实现了Core类中定义的方法
  • storage:定义了消息队列,以及模板
posted @ 2019-06-10 16:15  咕咚!  阅读(420)  评论(0编辑  收藏  举报