Skip to content

Repository files navigation

Signal Bot Framework

PyPI Downloads Version License CI codecov

Python package to build your own Signal bots.

Installation

See the getting started section in the documentation.

Minimal bot

This is what a minimal bot using signalbot looks like:

import logging
import os

from signalbot import (
    Config,
    DataMessageContext,
    DataMessageHandler,
    SendMessage,
    SignalBot,
    text_triggered,
)


class PingCommand(DataMessageHandler):
    @text_triggered("Ping")
    async def handle_data_message(self, context: DataMessageContext) -> None:
        await context.send(SendMessage(text="Pong"))


if __name__ == "__main__":
    bot = SignalBot(
        Config(
            phone_number=os.environ["PHONE_NUMBER"],
            logging_level=logging.INFO,
        )
    )
    bot.register(PingCommand())
    bot.start()

Help

See the documentation for more details.

About

Micro framework to create your own signal bots.

Topics

Resources

Contributing

Stars

278 stars

Watchers

5 watching

Forks

Releases

Packages

Used by

Contributors

Languages