Skip to content

Commit 8719d6a

Browse files
authored
Merge pull request #1 from Y1ran/main
Update README.md
2 parents 559b507 + af08180 commit 8719d6a

File tree

1 file changed

+0
-303
lines changed

1 file changed

+0
-303
lines changed

python-wechaty/README.md

Lines changed: 0 additions & 303 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,6 @@
1414

1515
[📄 Chinese Document](https://wechaty.readthedocs.io/zh_CN/latest/) [python-wechaty-template](https://github.com/wechaty/python-wechaty-template)
1616

17-
## Getting Started
1817

1918
* [Python Wechaty Quick Start Project Template](https://github.com/wechaty/python-wechaty-template)
2019
* [Padlocal机器人](https://wechaty.readthedocs.io/zh_CN/latest/introduction/use-padlocal-protocol/)
@@ -23,308 +22,6 @@
2322
* 飞书机器人
2423
* ...
2524

26-
## Connecting Chatbots
27-
28-
[![Powered by Wechaty](https://img.shields.io/badge/Powered%20By-Wechaty-brightgreen.svg)](https://github.com/Wechaty/wechaty)
29-
30-
Wechaty is a Conversational SDK for Chatbot Makers that can help you create a bot in 9 lines of Python.
31-
32-
## Voice of the Developers
33-
34-
> "Wechaty is a great solution, I believe there would be much more users recognize it." [link](https://github.com/Wechaty/wechaty/pull/310#issuecomment-285574472)
35-
> &mdash; <cite>@Gcaufy, Tencent Engineer, Author of [WePY](https://github.com/Tencent/wepy)</cite>
36-
>
37-
> "太好用,好用的想哭"
38-
> &mdash; <cite>@xinbenlv, Google Engineer, Founder of HaoShiYou.org</cite>
39-
>
40-
> "最好的微信开发库" [link](http://weibo.com/3296245513/Ec4iNp9Ld?type=comment)
41-
> &mdash; <cite>@Jarvis, Baidu Engineer</cite>
42-
>
43-
> "Wechaty让运营人员更多的时间思考如何进行活动策划、留存用户,商业变现" [link](http://mp.weixin.qq.com/s/dWHAj8XtiKG-1fIS5Og79g)
44-
> &mdash; <cite>@lijiarui, Founder & CEO of Juzi.BOT.</cite>
45-
>
46-
> "If you know js ... try Wechaty, it's easy to use."
47-
> &mdash; <cite>@Urinx Uri Lee, Author of [WeixinBot(Python)](https://github.com/Urinx/WeixinBot)</cite>
48-
49-
See more at [Wiki:Voice Of Developer](https://github.com/Wechaty/wechaty/wiki/Voice%20Of%20Developer)
50-
51-
## Join Us
52-
53-
Wechaty is used in many ChatBot projects by thousands of developers. If you want to talk with other developers, just scan the following QR Code in WeChat with secret code _python wechaty_, join our **Wechaty Python Developers' Home**.
54-
55-
![Wechaty Friday.BOT QR Code](https://wechaty.js.org/img/friday-qrcode.svg)
56-
57-
Scan now, because other Wechaty Python developers want to talk with you too! (secret code: _python wechaty_)
58-
59-
## The World's Shortest Python ChatBot: 9 lines of Code
60-
61-
```python
62-
from wechaty import Wechaty
63-
64-
import asyncio
65-
async def main():
66-
bot = Wechaty()
67-
bot.on('scan', lambda status, qrcode, data: print('Scan QR Code to login: {}\nhttps://wechaty.js.org/qrcode/{}'.format(status, qrcode)))
68-
bot.on('login', lambda user: print('User {} logged in'.format(user)))
69-
bot.on('message', lambda message: print('Message: {}'.format(message)))
70-
await bot.start()
71-
72-
asyncio.run(main())
73-
```
74-
75-
## Python Wechaty Developing Plan
76-
77-
We already have Wechaty in TypeScript, It will be not too hard to translate the TypeScript(TS) to Python(PY) because [wechaty](https://github.com/wechaty/wechaty) has only 3,000 lines of the TS code, they are well designed and de-coupled by the [wechaty-puppet](https://github.com/wechaty/wechaty-puppet/) abstraction. So after we have translated those 3,000 lines of TypeScript code, we will almost be done.
78-
79-
As we have already a ecosystem of Wechaty in TypeScript, so we will not have to implement everything in Python, especially, in the Feb 2020, we have finished the [wechaty-grpc](https://github.com/wechaty/grpc) service abstracting module with the [wechaty-puppet-service](https://github.com/wechaty/wechaty-puppet-service) implmentation.
80-
81-
The following diagram shows out that we can reuse almost everything in TypeScript, and what we need to do is only the block located at the top right of the diagram: `Wechaty (Python)`.
82-
83-
```ascii
84-
+--------------------------+ +--------------------------+
85-
| | | |
86-
| Wechaty (TypeScript) | | Wechaty (Python) |
87-
| | | |
88-
+--------------------------+ +--------------------------+
89-
90-
+-------------------------------------------------------+
91-
| Wechaty Puppet Service |
92-
| |
93-
| (wechaty-puppet-service) |
94-
+-------------------------------------------------------+
95-
96-
+--------------------- wechaty-grpc ----------------------+
97-
98-
+-------------------------------------------------------+
99-
| Wechaty Puppet Abstract |
100-
| |
101-
| (wechaty-puppet) |
102-
+-------------------------------------------------------+
103-
104-
+--------------------------+ +--------------------------+
105-
| Pad Protocol | | Web Protocol |
106-
| | | |
107-
| wechaty-puppet-padplus | |(wechaty-puppet-puppeteer)|
108-
+--------------------------+ +--------------------------+
109-
+--------------------------+ +--------------------------+
110-
| Windows Protocol | | Mac Protocol |
111-
| | | |
112-
| (wechaty-puppet-windows) | | (wechaty-puppet-macpro) |
113-
+--------------------------+ +--------------------------+
114-
```
115-
116-
## Example: How to Translate TypeScript to Python
117-
118-
There's a 100 lines class named `Image` in charge of downloading the WeChat image to different sizes.
119-
120-
It is a great example for demonstrating how do we translate the TypeScript to Python in Wechaty Way:
121-
122-
### Image Class Source Code
123-
124-
- TypeScript: <https://github.com/wechaty/wechaty/blob/master/src/user/image.ts>
125-
- Python: <https://github.com/wechaty/python-wechaty/blob/master/src/wechaty/user/image.py>
126-
127-
If you are interested in the translation and want to look at how it works, it will be a good start from reading and comparing those two `Image` class files in TypeScript and Python at the same time.
128-
129-
## To-do List
130-
131-
- TS: TypeScript
132-
- SLOC: Source Lines Of Code
133-
134-
### Wechaty Internal Modules
135-
136-
1. [ ] Class Wechaty @wj-mCat
137-
- TS SLOC(1160): <https://github.com/wechaty/wechaty/blob/master/src/wechaty.ts>
138-
- [ ] Code
139-
- [ ] Unit Tests
140-
- [ ] Documentation
141-
1. [ ] Class Contact
142-
- TS SLOC(804): <https://github.com/wechaty/wechaty/blob/master/src/user/contact.ts>
143-
- [ ] Code
144-
- [ ] Unit Tests
145-
- [ ] Documentation
146-
1. [ ] Class ContactSelf
147-
- TS SLOC(199): <https://github.com/wechaty/wechaty/blob/master/src/user/contact-self.ts>
148-
- [ ] Code
149-
- [ ] Unit Tests
150-
- [ ] Documentation
151-
1. [ ] Class Message
152-
- TS SLOC(1054): <https://github.com/wechaty/wechaty/blob/master/src/user/message.ts>
153-
- [ ] Code
154-
- [ ] Unit Tests
155-
- [ ] Documentation
156-
1. [ ] Class Room
157-
- TS SLOC(1194): <https://github.com/wechaty/wechaty/blob/master/src/user/room.ts>
158-
- [ ] Code
159-
- [ ] Unit Tests
160-
- [ ] Documentation
161-
1. [ ] Class Image @wj-mCat
162-
- TS SLOC(60): <https://github.com/wechaty/wechaty/blob/master/src/user/image.ts>
163-
- [ ] Code
164-
- [ ] Unit Tests
165-
- [ ] Documentation
166-
1. [x] Class Accessory @huan
167-
- TS SLOC(179): <https://github.com/wechaty/wechaty/blob/master/src/accessory.ts>
168-
- [x] Code
169-
- [x] Unit Tests
170-
- [ ] Documentation
171-
1. [ ] Class Config @wj-mCat
172-
- TS SLOC(187): <https://github.com/wechaty/wechaty/blob/master/src/config.ts>
173-
- [ ] Code
174-
- [ ] Unit Tests
175-
- [ ] Documentation
176-
1. [ ] Class Favorite
177-
- TS SLOC(52): <https://github.com/wechaty/wechaty/blob/master/src/user/favorite.ts>
178-
- [ ] Code
179-
- [ ] Unit Tests
180-
- [ ] Documentation
181-
1. [ ] Class Friendship
182-
- TS SLOC(417): <https://github.com/wechaty/wechaty/blob/master/src/user/friendship.ts>
183-
- [ ] Code
184-
- [ ] Unit Tests
185-
- [ ] Documentation
186-
1. [ ] Class MiniProgram
187-
- TS SLOC(70): <https://github.com/wechaty/wechaty/blob/master/src/user/mini-program.ts>
188-
- [ ] Code
189-
- [ ] Unit Tests
190-
- [ ] Documentation
191-
1. [ ] Class RoomInvitation
192-
- TS SLOC(317): <https://github.com/wechaty/wechaty/blob/master/src/user/room-invitation.ts>
193-
- [ ] Code
194-
- [ ] Unit Tests
195-
- [ ] Documentation
196-
1. [ ] Class Tag
197-
- TS SLOC(190): <https://github.com/wechaty/wechaty/blob/master/src/user/tag.ts>
198-
- [ ] Code
199-
- [ ] Unit Tests
200-
- [ ] Documentation
201-
1. [ ] Class UrlLink
202-
- TS SLOC(107): <https://github.com/wechaty/wechaty/blob/master/src/user/url-link.ts>
203-
- [ ] Code
204-
- [ ] Unit Tests
205-
- [ ] Documentation
206-
207-
### Wechaty External Modules
208-
209-
1. [ ] Class FileBox
210-
- TS SLOC(638): <https://github.com/huan/file-box/blob/master/src/file-box.ts>
211-
- [ ] Code
212-
- [ ] Unit Tests
213-
- [ ] Documentation
214-
1. [ ] Class MemoryCard
215-
- TS SLOC(376): <https://github.com/huan/memory-card/blob/master/src/memory-card.ts>
216-
- [ ] Code
217-
- [ ] Unit Tests
218-
- [ ] Documentation
219-
1. [ ] Class WechatyPuppet
220-
- TS SLOC(1115): <https://github.com/wechaty/wechaty-puppet/blob/master/src/puppet.ts>
221-
- [ ] Code
222-
- [ ] Unit Tests
223-
- [ ] Documentation
224-
1. [ ] Class WechatyPuppetHostie
225-
- TS SLOC(909): <https://github.com/wechaty/wechaty-puppet-service/blob/master/src/client/puppet-service.ts>
226-
227-
## Usage
228-
229-
WIP...
230-
231-
## Requirements
232-
233-
1. Python 3.7+
234-
235-
## Install
236-
237-
```shell
238-
pip3 install wechaty
239-
```
240-
241-
## See Also
242-
243-
- [Packaging Python Projects](https://packaging.python.org/tutorials/packaging-projects/)
244-
245-
### Static & Instance of Class
246-
247-
- [Static variables and methods in Python](https://radek.io/2011/07/21/static-variables-and-methods-in-python/)
248-
249-
### Typings
250-
251-
- [PEP 526 -- Syntax for Variable Annotations - Class and instance variable annotations](https://www.python.org/dev/peps/pep-0526/#class-and-instance-variable-annotations)
252-
- [Python Type Checking (Guide)](https://realpython.com/python-type-checking/) by [Geir Arne Hjelle](https://realpython.com/team/gahjelle/)
253-
254-
## History
255-
256-
### v0.6 (Jun 19, 2020)
257-
258-
Python Wechaty Scala Wechaty **BETA** Released!
259-
260-
Read more from our Multi-language Wechaty Beta Release event from our blog:
261-
262-
- [Multi Language Wechaty Beta Release Announcement!](https://wechaty.js.org/2020/06/19/multi-language-wechaty-beta-release/)
263-
264-
### v0.4 (Mar 15, 2020) master
265-
266-
Welcome [@huangaszaq](https://github.com/huangaszaq) for joining the project! [#42](https://github.com/wechaty/python-wechaty/pull/42)
267-
268-
1. Add a friendly exception message for PyPI users. [#24](https://github.com/wechaty/python-wechaty/issues/24)
269-
270-
### v0.1 (Mar 8, 2020)
271-
272-
Welcome [@wj-Mcat](https://github.com/wj-Mcat) for joining the project! [#4](https://github.com/wechaty/python-wechaty/pull/4)
273-
274-
1. Starting translate TypeScript of Wechaty to Python
275-
1. DevOps Setup
276-
1. Type Checking: mypy & pytype
277-
1. Unit Testing: pytest
278-
1. Linting: pylint, pycodestyle, and flake8
279-
1. CI/CD: GitHub Actions
280-
1. Publish to PyPI automatically after the tests passed.
281-
282-
### v0.0.1 (Aug 25, 2018)
283-
284-
Project created, publish a empty module `wechaty` on PyPI.
285-
286-
## Related Projects
287-
288-
- [Wechaty](https://github.com/wechaty/wechaty) - Conversatioanl AI Chatot SDK for Wechaty Individual Accounts (TypeScript)
289-
- [Python Wechaty](https://github.com/wechaty/python-wechaty) - Python WeChaty Conversational AI Chatbot SDK for Wechat Individual Accounts (Python)
290-
- [Go Wechaty](https://github.com/wechaty/go-wechaty) - Go WeChaty Conversational AI Chatbot SDK for Wechat Individual Accounts (Go)
291-
- [Java Wechaty](https://github.com/wechaty/java-wechaty) - Java WeChaty Conversational AI Chatbot SDK for Wechat Individual Accounts (Java)
292-
- [Scala Wechaty](https://github.com/wechaty/scala-wechaty) - Scala WeChaty Conversational AI Chatbot SDK for WechatyIndividual Accounts (Scala)
293-
294-
## Badge
295-
296-
[![Wechaty in Python](https://img.shields.io/badge/Wechaty-Python-blue)](https://github.com/wechaty/python-wechaty)
297-
298-
```md
299-
[![Wechaty in Python](https://img.shields.io/badge/Wechaty-Python-blue)](https://github.com/wechaty/python-wechaty)
300-
```
301-
302-
## Stargazers over time
303-
304-
[![Stargazers over time](https://starchart.cc/wechaty/python-wechaty.svg)](https://starchart.cc/wechaty/python-wechaty)
305-
306-
## Contributors
307-
308-
<a href="https://github.com/wechaty/python-wechaty/graphs/contributors">
309-
<img src="https://contrib.rocks/image?repo=wechaty/python-wechaty" />
310-
</a>
311-
312-
Made with [contrib.rocks](https://contrib.rocks).
313-
314-
## Support
315-
316-
Thanks the following supported Software.
317-
318-
[![test image size](https://resources.jetbrains.com/storage/products/company/brand/logos/jb_beam.svg?_gl=1*1lb7oaa*_ga*MjE5ODE2MzAwLjE2MzYxODMyNTE.*_ga_V0XZL7QHEB*MTY0MTI2NzU5OS41LjEuMTY0MTI2NzY3OC4w&_ga=2.157122558.411488113.1641267600-219816300.1636183251)](https://jb.gg/OpenSourceSupport)
319-
320-
## Committers
321-
322-
1. [@huangaszaq](https://github.com/huangaszaq) - Chunhong HUANG (黄纯洪)
323-
324-
## Creators
325-
326-
- [@wj-Mcat](https://github.com/wj-Mcat) - Jingjing WU (吴京京)
327-
- [@huan](https://github.com/huan) - ([李卓桓](http://linkedin.com/in/zixia)) zixia@zixia.net
32825

32926
## Copyright & License
33027

0 commit comments

Comments
 (0)