Skip to main content

A Bot framework to build bots with human manners

Project description

warning: Pengbo is currently in DESIGN

import pengbot
from pengbot.adapters.slack import SlackRobot, Mention


@pengbot.make_robot(SlackRobot)
def mybot(bot):
    bot.context = bot.context(
        api_token=os.environ.get('SLACK_API_TOKEN', None)
    )


@mybot.hears(Mention)
def talking_parrot(bot, message):
    yield from bot.says(':bird: %s' % message['text'] , channel=message['channel'])


if __name__ == '__main__':
    mybot()

Installation

$ pip install pengbot

Documentation

TODO

  • Fuzzy string match for commands

  • Commands receive message context.

  • Listen all messages to trigger commands.

  • Adapters for Slack, XMPP, Twitter.

  • Message stream filters.

  • Message stream middlewares.

  • Stream response messages.

  • Natural Language Processing?. http://spacy.io

Example ideas

  • Auto linking for Jira Issues.

  • Attach user mentions to issues as comments in Jira.

  • Bots talking to bots.

  • Voting and Polls.

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

pengbot-0.1a1.tar.gz (10.5 kB view hashes)

Uploaded Source

Built Distribution

pengbot-0.1a1-py2.py3-none-any.whl (13.5 kB view hashes)

Uploaded Python 2 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