-
Notifications
You must be signed in to change notification settings - Fork 240
Description
Because the python-wechaty repo is in the very early stage and is based on wechaty-puppet, which have not started. So if we want to get start, I think the best way right now is making the interfaces of the wechaty-puppet, and don't implement it.
But there is a convention that the name of the wechaty-puppet directory should be same as the name of the repo, which will be implement soon.
We will write all the needed interface in the wechaty-puppet directory. Below is the code structure.
│── src
│ └── wechaty
│ ├── init.py
│ ├── accessory.py
│ ├── config.py
│ ├── config_test.py
│ ├── images.py
│ ├── user
│ │ └── init.py
│ └── wechaty.py
│── tests
│ └── smoke_testing_test.py
└── wechaty_puppet
│── init.py
│── file_box.py
└── puppet.py
src directory is all we should implement. wechaty_puppet directory is the interface which will be implement soon.
Below is the example of the file_box.py.
"""
docstring
"""
# dummy class
class FileBox:
"""
maintain the file content, which is sended by wechat
"""
def to_json(self) -> dict:
"""
dump the file content to json object
:return:
"""
raise NotImplementedError
def to_file(self, file_path: str) -> None:
"""
save the content to the file
:return:
"""
raise NotImplementedError