Skip to main content

Errbot is a chatbot designed to be simple to extend with plugins written in Python.

Project description

https://errbot.readthedocs.org/en/latest/_static/errbot.png

https://github.com/errbotio/errbot/workflows/Python%20package/badge.svg Latest Version License Join the chat at https://gitter.im/errbotio/errbot

Errbot

Errbot is a chatbot. It allows you to start scripts interactively from your chatrooms for any reason: random humour, chatops, starting a build, monitoring commits, triggering alerts…

It is written and easily extensible in Python.

Errbot is available as open-source software and released under the GPL v3 license.

Features

Chat servers support

Built-in

With add-ons

Administration

After the initial installation and security setup, Errbot can be administered by just chatting to the bot (chatops).

  • install/uninstall/update/enable/disable private or public plugins hosted on git

  • plugins can be configured from chat

  • direct the bot to join/leave Multi User Chatrooms (MUC)

  • Security: ACL control feature (admin/user rights per command)

  • backup: an integrated command !backup creates a full export of persisted data.

  • logs: can be inspected from chat or streamed to Sentry.

Developer features

  • Very easy to extend in Python! (see below)

  • Presetup storage for every plugin i.e. self['foo'] = 'bar' persists the value.

  • Conversation flows to track conversation states from users.

  • Webhook callbacks support

  • supports markdown extras formatting with tables, embedded images, links etc.

  • configuration helper to allow your plugin to be configured by chat

  • Graphical and text development/debug consoles

  • Self-documenting: your docstrings become help automatically

  • subcommands and various arg parsing options are available (re, command line type)

  • polling support: your can setup a plugin to periodically do something

  • end to end test backend

  • card rendering under Slack and Hipchat.

Community and support

If you have:

For more general discussion and announcements, you can join us on google plus community. You can also ping us on Twitter with the hashtag #errbot.

Installation

Prerequisites

Errbot runs under Python 3.6+ on Linux, Windows and Mac. For some chatting systems you’ll need a key or a login for your bot to access it.

Quickstart

We recommend to setup a virtualenv.

  1. Install errbot from pip

  2. Make a directory somewhere (here called errbot) to host Errbot’s data files

  3. Initialize the directory

  4. Try out Errbot in text mode

$ pip install errbot
$ mkdir errbot; cd errbot
$ errbot --init
$ errbot

It will show you a prompt >>> so you can talk to your bot directly! Try !help to get started.

Adding support for a chat system

For the built-ins, just use one of those options slack, hipchat, telegram, IRC, XMPP with pip, you can still do it after the initial installation to add the missing support for example

$ pip install "errbot[slack]"

For the external ones (Skype, Gitter, Discord etc …), please follow their respective github pages for instructions.

Configuration

In order to configure Errbot to connect to one of those chat systems you’ll need to tweak the config.py file generated by errbot –init.

To help you, we have a documented template available here: config-template.py.

Note: even if you changed the BACKEND from the configuration, you can still use errbot -T and errbot -G to test out your instance locally (in text and graphic mode respectively).

Starting Errbot as a daemon

If all that worked, you can now use the -d (or –daemon) parameter to run it in a detached mode:

errbot --daemon

Interacting with the Bot

After starting Errbot, you should add the bot to your buddy list if you haven’t already. You’ll need to invite the bot explicitly to chatrooms on some chat systems too. You can now send commands directly to the bot!

To get a list of all available commands, you can issue:

!help

If you just wish to know more about a specific command you can issue:

!help command

Managing plugins

You can administer the bot in a one-on-one chat if your handle is in the BOT_ADMINS list in config.py.

For example to keyword search in the public plugin repos you can issue:

!repos search jira

To install a plugin from this list, issue:

!repos install <name of repo>

For example !repos install errbotio/err-imagebot.

Writing plugins

Writing your own plugins is extremely simple. errbot –init will have installed in the plugins subdirectory a plugin called err-example you can use as a base.

As an example, this is all it takes to create a “Hello, world!” plugin for Errbot:

from errbot import BotPlugin, botcmd

class Hello(BotPlugin):
    """Example 'Hello, world!' plugin for Errbot"""

    @botcmd
    def hello(self, msg, args):
        """Return the phrase "Hello, world!" to you"""
        return "Hello, world!"

This plugin will create the command “!hello” which, when issued, returns “Hello, world!” to you. For more info on everything you can do with plugins, see the plugin development guide.

Contribution to Errbot itself

Feel free to fork and propose changes on github

v6.1.7 (2020-12-18)

features:

  • core: Add support for python3.9 (#1477)

  • chore: Allow dependabot to check GitHub actions weekly (#1464)

  • chore: Add Dockerfile (#1482)

fixes:

  • core: AttributeError on Blacklisted plugins (#1369)

  • chore: Remove travis configuration (#1478)

  • chore: minor code cleanup (#1465)

  • chore: Use black codestyle (#1457, #1485)

  • chore: Use twine to check dist (#1485)

  • chore: remove codeclimate and eslint configs (#1490)

v6.1.6 (2020-11-16)

features:

  • core: Update code to support markdown 3 (#1473)

fixes:

  • backends: Set email property as non-abstract (#1461)

  • SlackRTM: username to userid method signature (#1458)

  • backends: AttributeError in callback_reaction (#1467)

  • docs: webhook examples (#1471)

  • cli: merging configs with unknown keys (#1470)

  • plugins: Fix error when plugin plug file is missing description (#1462)

  • docs: typographical issues in setup guide (#1475)

  • refactor: Split changelog by major versions (#1474)

v6.1.5 (2020-10-10)

features:

  • XMPP: Replace sleekxmpp with slixmpp (#1430)

  • New callback for reaction events (#1292)

  • Added email property foriPerson object on all backends (#1186, #1456)

  • chore: Add github actions (#1455)

fixes:

  • Slack: Deprecated method calls (#1432, #1438)

  • Slack: Increase message size limit. (#1333)

  • docs: Remove Matrix backend link (#1445)

  • SlackRTM: Missing ‘id_’ in argument (#1443)

  • docs: fixed rendering with double hyphens (#1452)

  • cli: merging configs via --storage-merge option (#1450)

v6.1.4 (2020-05-15)

fixes:

  • 403 error when fetching plugin repos index (#1425)

v6.1.3 (2020-04-19)

features:

  • Add security linter (#1314)

  • Serve version.json on errbot.io and update version checker plugin (#1400)

  • Serve repos.json on errbot.io (#1403, #1406)

  • Include SlackRTM backend (beta) (#1416)

fixes:

  • Make plugin name clashes deterministic (#1282)

  • Fix error with Flows missing descriptions (#1405)

  • Fix !repos update object attribute error (#1410)

  • Fix updating remove repos using !repos update (#1413)

  • Fix deprecation warning (#1423)

  • Varios documentation fixes (#1404, #1411, #1415)

v6.1.2 (2019-12-15)

fixes:

  • Add ability to re-run –init safely (#1390)

  • fix #1375 by managing errors on lack of version endpoint.

  • Fixed a deprecation warning for 3.9 on Mapping.

  • removing the intermediate domain requiring a certificate.

  • Fix package name for sentry-sdk flask integration

  • Add support to sentry FlaskIntegration

  • Migrate from raven (deprecated) to new sentry-sdk

  • fix: Log errors when present

  • Make chatroom log more descriptive

  • Set admin check log as debug

  • Add admin warnings to log

  • Fix: Advanced loop graph does not reflect the image

  • make the TestBot start timeout parameterized

  • errbot/plugin_manager: only check for /proc/1/cgroup if path exists to fix warning

  • removed (c) Apple asset we completely missed.

  • fix double threading in slack backend if DIVERT_TO_THREAD is used

  • pop up the timeout for travis

  • Makes the timeout feedback better on tests. (#1366)

  • Move all tox environments to use py37 (#1342)

  • Remove empty “text” body on Slack send_card (#1336)

  • Load class source in reloading plugins (#1347)

  • test: Rename assertCommand -> assertInCommand (#1351)

  • Enforce BOT_EXTRA_BACKEND_DIR is a list type. (#1358)

  • Fix #1360 Cast pathlib.Path objects to strings for use with sys.path (#1361)

v6.1.1 (2019-06-22)

fixes:

  • Installation using wheel distribution on python 3.6 or older

v6.1.0 (2019-06-16)

features:

  • Use python git instead of system git binary (#1296)

fixes:

  • errbot -l cli error (#1315)

  • Slack backend by pinning slackclient to supported version (#1343)

  • Make –storage-merge merge configs (#1311)

  • Exporting values in backup command (#1328)

  • Rename Spark to Webex Teams (#1323)

  • Various documentation fixes (#1310, #1327, #1331)

v6.0.0 (2019-03-23)

features:

  • TestBot: Implement inject_mocks method (#1235)

  • TestBot: Add multi-line command test support (#1238)

  • Added optional room arg to inroom

  • Adds ability to go back to a previous room

  • Pass telegram message id to the callback

fixes:

  • Remove extra spaces in uptime output

  • Fix/backend import error messages (#1248)

  • Add docker support for installing package dependencies (#1245)

  • variable name typo (#1244)

  • Fix invalid variable name (#1241)

  • sanitize comma quotation marks too (#1236)

  • Fix missing string formatting in “Command not found” output (#1259)

  • Fix webhook test to not call fixture directly

  • fix: arg_botcmd decorator now can be used as plain method

  • setup: removing dnspython

  • pin markdown <3.0 because safe is deprecated

v6.0.0-alpha (2018-06-10)

major refactoring:

  • Removed Yapsy dependency

  • Replaced back Bottle and Rocket by Flask

  • new Pep8 compliance

  • added Python 3.7 support

  • removed Python 3.5 support

  • removed old compatibility cruft

  • ported formats and % str ops to f-strings

  • Started to add field types to improve type visibility across the codebase

  • removed cross dependencies between PluginManager & RepoManager

fixes:

  • Use sys.executable explicitly instead of just ‘pip’ (thx Bruno Oliveira)

  • Pycodestyle fixes (thx Nitanshu)

  • Help: don’t add bot prefix to non-prefixed re cmds (#1199) (thx Robin Gloster)

  • split_string_after: fix empty string handling (thx Robin Gloster)

  • Escaping bug in dynamic plugins

  • botmatch is now visible from the errbot module (fp to Guillaume Binet)

  • flows: hint boolean was not forwarded

  • Fix possible event without bot_id (#1073) (thx Roi Dayan)

  • decorators were working only if kwargs were empty

  • Message.clone was ignoring partial and flows

features:

  • partial boolean to flag partial mesages (thx Meet Mangukiya)

  • Slack: room joined callback (thx Jeremy Kenyon)

  • XMPP: real_jid to get the jid the users logged in (thx Robin Gloster)

  • The callback order set in the config is not globally respected

  • Added a default parameter to the storage context manager

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

errbot-6.1.7.tar.gz (197.4 kB view details)

Uploaded Source

Built Distribution

errbot-6.1.7-py3-none-any.whl (205.2 kB view details)

Uploaded Python 3

File details

Details for the file errbot-6.1.7.tar.gz.

File metadata

  • Download URL: errbot-6.1.7.tar.gz
  • Upload date:
  • Size: 197.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.21.0 setuptools/40.7.2 requests-toolbelt/0.9.1 tqdm/4.45.0 CPython/3.7.9

File hashes

Hashes for errbot-6.1.7.tar.gz
Algorithm Hash digest
SHA256 9409cb48b7e9ca780a8b6f18c736d6c63d041465f0d59eeea661ef9516cff546
MD5 b6392e3383d8abe91764e41a61a560e5
BLAKE2b-256 698c1cd8a42daa0df627440e7f67e0036c952116370393b6c8d99a2459ee9d54

See more details on using hashes here.

File details

Details for the file errbot-6.1.7-py3-none-any.whl.

File metadata

  • Download URL: errbot-6.1.7-py3-none-any.whl
  • Upload date:
  • Size: 205.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.21.0 setuptools/40.7.2 requests-toolbelt/0.9.1 tqdm/4.45.0 CPython/3.7.9

File hashes

Hashes for errbot-6.1.7-py3-none-any.whl
Algorithm Hash digest
SHA256 2513e10bcf4fda837a6fe7c8afe3fd2b25a5b26cc74c0d7bb931be8578c16dd9
MD5 9083fbba73f513277ea1a8dfdb4a4b5f
BLAKE2b-256 b652b76bf8519fb541e73bdb2654be53b8a56d4ec08055abff1e16bf56bd8784

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