Sir Bot-a-lot | Asynchronous bot framework¶
This project aims to provide a simple library to generate bots for various services. The initial goal was to implement a bot for the slack team of the pyslackers community.
Installation¶
$ pip3 install sirbot
We recommend installing it in a virtual environment.
To run the bot initialize it and call the bot.start method:
from sirbot import SirBot
bot = SirBot()
bot.start(host='0.0.0.0', port=80)
For examples take a look at the How To and the pyslackers bot.
Plugins¶
Sir Bot-a-lot connect to services with plugins, some are bundled by default:
sirbot.plugins.github.GithubPluginFor Github.sirbot.plugins.slack.SlackPluginFor Slack.sirbot.plugins.postgres.PgPluginFor PostgreSQL.sirbot.plugins.apscheduler.APSchedulerPluginFor APscheduler.
To load a plugin call the bot.load method:
from sirbot import SirBot
from sirbot.plugins.slack import SlackPlugin
bot = SirBot()
slack = SlackPlugin(token='supersecureslacktoken')
bot.load(slack)
bot.start(host='0.0.0.0', port=80)