Skip to main content

Dead simple bot framework.

Project description

https://travis-ci.org/heavenshell/py-robo.png?branch=master

Dead simple bot framework which is inspired by Ruby’s ruboty.

Why reinvent the wheel

I Love Python and I’m not good at Node.js(hubot), Ruby(Ruboty).

Err is pluggable but it’s too complex for me.

brutal is also pluggable but I don’t wont to write config file.

So I reinvent the wheel.

Architecture

Message flow.

                            +--[handler a]--+
                            |               |
[chat service]-->[adapter]--+--[handler b]--+--[adapter]-->[chat service]
                            |               |
                            +--[handler c]--+

Adapter

Adapter is interface of chat services receive message and send message to chat service.

Robo includes two adapters.

  • shell

  • Slack

Handler

Handler provides various behaviors to your robot.

from robo.decorators import cmd

class Ping(object):
    @cmd(regex=r'^ping', description='')
    def pong(self, message, **kwargs):
        return 'pong'

This handler matches message ping and return pong to chat service.

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

robo-0.4.5.tar.gz (9.1 kB view details)

Uploaded Source

File details

Details for the file robo-0.4.5.tar.gz.

File metadata

  • Download URL: robo-0.4.5.tar.gz
  • Upload date:
  • Size: 9.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No

File hashes

Hashes for robo-0.4.5.tar.gz
Algorithm Hash digest
SHA256 e09be1fa4ef9b99d88e0602df1c05d70d226bf87c306be1e16bae7d8fd3d839f
MD5 0ce2e0d65def4b8f1b1dcd14489d29d9
BLAKE2b-256 7e27a3f29d95988e044ac3ea4b9c482ab6756f25b990c6a4fbe2d0c7da69508b

See more details on using hashes here.

Supported by

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