The engine for developing bots for soc. networks, instant messengers and other systems.


Keywords
engine social-networks messengers bots asyncio, asyncio, bots, engine, messengers, python3, social-networks
License
MIT
Install
pip install kutana==1.0.5

Documentation

Kutana logo

Documentation Status Build Status CodeFactor Codacy Badge Coverage Status Codebeat Badge PyPI version Plugins repo

English | Русский

Kutana

The engine for developing bots for soc. networks, instant messengers and other systems. You can find repository with plugins for kutana here.

Installation

  • Download and install python (3.5.3+)
https://www.python.org/downloads/
  • Install kutana module (use python3 if needed)
python -m pip install kutana

Usage

  • Create Kutana engine and add controllers.
  • Register your plugins in the executor. You can import plugin from folders with function load_plugins. Files should be a valid python modules with available plugin field with your plugin (Plugin).
  • Start engine.

Example run.py (token for VKController is loaded from the file "configuration.json" and plugins are loaded from folder "plugins/")

from kutana import *

# Create engine
kutana = Kutana()

# Add VKController to engine
kutana.add_controller(
    VKController(load_configuration("vk_token", "configuration.json"))
)

# Load and register plugins
kutana.executor.register_plugins(*load_plugins("plugins/"))

# Run engine
kutana.run()

Example plugins/echo.py

from kutana import Plugin

plugin = Plugin(name="Echo")

@plugin.on_startswith_text("echo")
async def on_echo(message, attachments, env):
    await env.reply("{}".format(env.body))

Available controllers

  • VKController (vk.com groups)

Authors