wechaty / python-wechaty

Python Wechaty is a Conversational RPA SDK for Chatbot Makers written in Python
https://wechaty.readthedocs.io/zh_CN/latest/
Apache License 2.0
1.56k stars 229 forks source link

Is there a plan to support wechaty-puppet-xp? #274

Open liuhewei opened 2 years ago

liuhewei commented 2 years ago

Is your feature request related to a problem? Please describe. In my case, I want to use python-wechaty with wechay-puppet-xp together, but currently python-wechaty can only support wechaty-puppet-service.

Describe the solution you'd like I can use python-wechaty with wechaty-puppet-xp together.

Describe alternatives you've considered I can only use python-wechaty with wechaty-puppet-service now.

Additional context Wechaty-puppet-xp: https://github.com/wechaty/wechaty-puppet-xp

huan commented 2 years ago

Definitely, the Python Wechaty supports the wechaty-puppet-xp because all the Puppet in the Wechaty ecosystem will be able to support each other without any problem.

All Wechaty Puppet Providers can be converted to a Wechaty Puppet Service by using our Wechaty Token Gateway, which means the wechaty-puppet-xp can be converted as well.

The only problem for using wechaty-puppet-xp with the token gateway is that currently in our docs, the token gateway is started by a docker command, but the wechaty-puppet-xp can not run inside a Linux docker.

The solution would be to use Wechaty under your Windows system and start the token gateway manually, which you can learn how to do this from the Wechaty Dockerfile and this line from entrypoint.sh and this line from package.json:

TL;DR: start Wechaty Token Gateway manually with Windows:

npm install -g wechaty
wechaty-io-client

Don't forget to set all environment variables correctly, according to DIY Wechaty Puppet Service

liuhewei commented 2 years ago

@huan Thanks for the quick response, but the advantage of wechaty-puppet-xp is that it doesn't need a token. When I'm running the demo and write some js or ts programs, there is no need for a token. Do you mean that the python program must communicate with wechaty-puppet-xp through wechaty token gateway?

huan commented 2 years ago

Do you mean that the python program must communicate with wechaty-puppet-xp through wechaty token gateway?

Yes, that's true.

The TOKEN for the wechaty puppet service is used for authorization, you are free to generate it by yourself.

Learn how to do it by reading our official docs at Create your own Wechaty Puppet Service TOKEN

liuhewei commented 2 years ago

@huan Got it , thanks!

huan commented 2 years ago

You are welcome!