Skip to content

pavel-karpovich/artem

Repository files navigation

Artem

Build Status Version PyPI version Python 3.6 License

This project is no longer being developed, but it still works fine.

Simple core for creating chatbots in VK (vk.com)

Artem is an easy core for creating chatbots in vk.com based on the flexible mechanism of user scenarios for replies.


Installing artem

To install artem through pip, execute follow command:

pip install artem

Also you can download the package from Python Package Index or Github Releases, unzip archive and use this command for install:

python setup.py install

Start of use

The simplest example of launching:

import artem

art = artem.Artem(GROUP_ID, GROUP_ACCESS_KEY)
art.on('MESSAGE', handler='Hello World from Artem!')
art.alive()

After running this script, the bot-chat will answer any incoming message with the words "Hello World from Artem!". For more, see below.

Description of the artem core

Artem core

The simplified scheme of the Artem core functioning: Artem Scheme

Artem events

Artem has three groups of handled scenarios:

  1. Scenarios of incoming events:
    • JOIN
    • MESSAGE
  2. Scenarios of time events:
    • TIME
    • IDLE
    • SILENCE
  3. Scenarios for postprocessing events:
    • POSTPROC
  4. Startup scenario:
    • START

Full event Handling Schema:

Artem events