Skip to main content

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.1.tar.gz (3.4 kB view details)

Uploaded Source

File details

Details for the file kuroko-0.1.1.tar.gz.

File metadata

  • Download URL: kuroko-0.1.1.tar.gz
  • Upload date:
  • Size: 3.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No

File hashes

Hashes for kuroko-0.1.1.tar.gz
Algorithm Hash digest
SHA256 696e1354416a7d4656a100c6b31150f958d4c9712b8d95b9ed9f9a73514afcfe
MD5 37fa089af7f14cb93dc8df1aad1a14f4
BLAKE2b-256 00284be0dd7e9482627028fe384ceb90ac50467db71cf0aeba1dc8e78f98e655

See more details on using hashes here.

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