GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — GitHub - wechaty/python-wechaty-getting-started: Python Wechaty Starter Project Template that Works Out-of-the-Box

BranchesTags
Open more actions menu

Latest commit

 

History

125 Commits
125 Commits

Folders and files

NameName
Last commit message
Last commit date
.github
.github
 
 
.vscode
.vscode
 
 
examples
examples
 
 
tests
tests
 
 
.editorconfig
.editorconfig
 
 
.gitignore
.gitignore
 
 
.gitpod.Dockerfile
.gitpod.Dockerfile
 
 
.gitpod.yml
.gitpod.yml
 
 
.pylintrc
.pylintrc
 
 
LICENSE
LICENSE
 
 
Makefile
Makefile
 
 
NOTICE
NOTICE
 
 
README.md
README.md
 
 
VERSION
VERSION
 
 
requirements-dev.txt
requirements-dev.txt
 
 
requirements.txt
requirements.txt
 
 

Repository files navigation

python-wechaty-getting-started PyPI Version Python 3.7

Python Wechaty

Gitpod Ready-to-Code Wechaty in Python

Python Wechaty Starter Project Template that Works Out-of-the-Box

Connecting Chatbots

Powered by Wechaty

Wechaty is a RPA SDK for Wechat Individual Account that can help you create a chatbot in 9 lines of Python.

Requirements

  1. python3.7+

Live Coding Video Tutorial

Here's a great live coding video tutorial from our Python Wechaty creator @wj-Mcat: https://wechaty.js.org/2020/10/26/python-wechaty-live-coding/

Quick Start

  1. Clone python-wechaty-getting-started repository

    git clone https://github.com/wechaty/python-wechaty-getting-started
    cd python-wechaty-getting-started
  2. Install Dependencies

    make install
    # or
    pip install -r requirements.txt
  3. Set token for your bot

You need a Wechaty Puppet Service Token first, you can learn how to get it from our official docs at https://wechaty.js.org/docs/puppet-services/.

```sh
# examples/ding-dong-bot.py : func-> main()
# it must be donut token
export WECHATY_PUPPET=wechaty-puppet-service
export WECHATY_PUPPET_SERVICE_TOKEN=your_token_at_here
```

or you can use `TOKEN` or `token` environment variable alias name to set **token**, for example:

```shell
export TOKEN=your_token_at_here
# or
export token=your_token_at_here
```

Learn more about the token related concepts by reading our blog post: Introducing Wechaty Puppet Service (Providers), @huan, Jan 14, 2021

  1. Run the bot

    make bot
    # or
    python examples/ding-dong-bot.py

The World's Shortest Python ChatBot: 9 lines of Code

from wechaty import Wechaty

import asyncio
async def main():
    bot = Wechaty()
    bot.on('scan', lambda status, qrcode, data: print('Scan QR Code to login: {}\nhttps://wechaty.wechaty.js/qrcode/{}'.format(status, qrcode)))
    bot.on('login', lambda user: print('User {} logged in'.format(user)))
    bot.on('message', lambda message: print('Message: {}'.format(message)))
    await bot.start()
asyncio.run(main())

Wechaty Getting Started in Multiple Languages

  • TypeScript Wechaty Getting Started
  • Python Wechaty Getting Started
  • Java Wechaty Getting Started
  • Go Wechaty Getting Started

Badge

Wechaty in Python

[![Wechaty in Python](https://img.shields.io/badge/Wechaty-Python-blue)](https://github.com/wechaty/python-wechaty)

Maintainers

@wechaty/python

Copyright & License

  • Code & Docs © 2020 Wechaty Contributors https://github.com/wechaty
  • Code released under the Apache-2.0 License
  • Docs released under Creative Commons

About

Python Wechaty Starter Project Template that Works Out-of-the-Box

gitpod.io/#https://github.com/wechaty/python-wechaty-getting-started

Topics

chatbotgetting-startedpythonwechaty

Resources

Readme
Apache-2.0 license
Activity
Custom properties

Stars

199 stars

Watchers

9 watching

Forks

51 forks
Report repository

Releases

Packages

Used by

Contributors

Languages

You are visitor 01402503 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.