Skip to main content

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

Project description

Kutana logo

Documentation Status Build Status CodeFactor Codacy Badge Coverage Status Total alerts PyPI version

Kutana

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

Installation

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

Usage

  • Create Kutana engine and add controllers. You can use shortcuts like VKKutana for adding and registering controllers, callbacks and other usefull functions.
  • You can set settings in Kutana.settings.
  • Add or create plugins other files and register them in executor. You can import plugin from files with function load_plugins. Files should be a valid python modules with available plugin field with your plugin (Plugin).
  • Start engine.

Example run.py

from kutana import Kutana, VKKutana, load_plugins

# Creation
kutana = VKKutana(configuration="configuration.json")

# Settings
kutana.settings["MOTD_MESSAGE"] = "Greetings, traveler."

# Create simple plugin
plugin = Plugin()

@self.plugin.on_text("hi", "hi!")
async def greet(message, attachments, env, extenv):
    await env.reply("Hello!")

kutana.executor.register_plugins(plugin)

# Load plugins from folder
kutana.executor.register_plugins(*load_plugins("plugins/"))

# Start kutana
kutana.run()

Example plugins/echo.py

from kutana import Plugin

plugin = Plugin()

plugin.name = "Echo"

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

Available controllers

  • VKController (vk.com groups)

Tasks

Task Priority
Find and fix all current bugs high
Find and fix grammar and semantic errors high
Create proper documentation medium
Adding tests medium
Add module to PyPi low
Developing plugins very low

Authors

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

kutana-0.0.4.tar.gz (8.4 kB view hashes)

Uploaded Source

Built Distribution

kutana-0.0.4-py3-none-any.whl (5.6 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page