Skip to main content

A Slack chatbot

Status

At the moment, I consider limbo to be feature complete, and the project is in maintenance mode. Every once in a while I come in and update the dependencies.

Contributions will be considered and may be accepted, you may want to email me because I might not notice your PR.

Python Versions

At the moment, this software only officially supports python >=3.10, because the test fixtures fail on older versions of python due to an urllib3 inconsistency I don’t understand.

It should still run on other versions of python, but for the moment they’re unfortunately not tested.

Installation

  1. Clone the repo

  2. Create a bot user if you don’t have one yet, and copy the API Token

  3. export SLACK_TOKEN=“your-api-token”

  4. make run (or make repl for local testing)

  5. Invite Limbo into any channels you want it in, or just message it in #general. Try typing !gif dubstep cat to test it out

kitten mittens

kitten mittens

I recommend that you always run limbo in a virtualenv so that you are running in a clean environment.

Command Arguments

  • --test, -t: Enter command line mode to enter a limbo repl.

  • --hook: Specify the hook to test. (Defaults to “message”).

  • -c: Run a single command.

  • --database, -d: Where to store the limbo sqlite3 database. Defaults to limbo.sqlite3.

  • --pluginpath, -pp: The path where limbo should look to find its plugins (defaults to /plugins).

  • --version, -v: Print a version number and exit

Environment Variables

  • SLACK_TOKEN: Slack API token. Required.

  • LIMBO_LOGLEVEL: The logging level. Defaults to INFO.

  • LIMBO_LOGFILE: File to log info to. Defaults to none.

  • LIMBO_LOGFORMAT: Format for log messages. Defaults to %(asctime)s:%(levelname)s:%(name)s:%(message)s.

  • LIMBO_PLUGINS: Comma-delimited string of plugins to load. Defaults to loading all plugins in the plugins directory (which defaults to “limbo/plugins”)

Note that if you are getting an error message about not seeing environment variables, you may be running limbo as sudo, which will clear the environment. Use a virtualenv and always run limbo as a user process!

Commands

It’s super easy to add your own commands! Just create a python file in the plugins directory with an on_message function that returns a string.

You can use the !help command to print out all available commands and a brief help message about them. !help <plugin> will return just the help for a particular plugin.

By default, plugins won’t react to messages from other bots (just messages from humans). Define an on_bot_message function to handle bot messages too. See the example plugins for an easy way to define these functions.

These are the current default plugins:

Contributors

Metadata

Release files for limbo 9.1.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for limbo 9.1.0
File Size Uploaded Provenance
limbo-9.1.0.tar.gz 39.7 kB Without provenance Details

Built distribution (wheel)

Table of built distributions (wheels) for limbo 9.1.0
File Interpreter ABI Platform
limbo-9.1.0-py3-none-any.whl Python 3 none any Details

Total release size: 82.7 kB

Release files / limbo-9.1.0.tar.gz

Download URL limbo-9.1.0.tar.gz
Size 39.7 kB
Tags Source
SHA-256 checksum
How to use checksums
f8d162964754f1def407a28f1133e1c7203c996b43307173bee6e66a6a77b1e0
BLAKE2b-256 checksum
How to use checksums
f51f7ab1a1d31fe801b2e4410b8d8a944c84d01852aadb6565fd0e0d8cebf149
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/5.0.0 CPython/3.10.12

Release files / limbo-9.1.0-py3-none-any.whl

Download URL limbo-9.1.0-py3-none-any.whl
Size 43.0 kB
Tags Python 3
SHA-256 checksum
How to use checksums
0e889b45b1935ed196c452c7f498e185a4fabd59294d45e81cdbe0169ef25b9e
BLAKE2b-256 checksum
How to use checksums
a7416f00abe97531524a48d57dc9e8909230791040a67a98e6701e58b6ee1586
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/5.0.0 CPython/3.10.12

Security for limbo 9.1.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

Release history Release notifications | RSS feed

This release

9.1.0 This release

2 release files No provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page