Minimalistic Python Bot Framework
Project description
Kuroko
Minimalistic Python Bot Framework
Requirements
Installation
pip install kuroko
Usage
5sec interval task execution
import kuroko
class MyBot(kuroko.Bot):
@kuroko.timer(5)
def echo_pong(self):
print("pong")
bot = MyBot()
bot.start()
crontab like task execution
class MyBot(kuroko.Bot):
@kuroko.crontab('*/5 * * * *')
def echo_pong(self):
print("pong")
watchdog thin wrapper
class MyBot(kuroko.Bot):
@kuroko.watch
def echo_pong(self, event):
print("pong", event)
@kuroko.watch(patterns=['*.py'])
def echo_ping(self, event):
print("ping", event)
License
MIT
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
kuroko-0.1.tar.gz
(3.1 kB
view hashes)