Skip to main content

Package to build Signal bots

Project description

Signal Bot Framework

Python package to build your own Signal bots. To run the the bot you need to start the signal-cli-rest-api service and link your device with it.

Todos

  • Examples on how to use the package
  • Documentation
  • Github actions to build on release

Classes and API

Signalbot

bot = Signalbot({
    "signal_service": "127.0.0.1:8080"
    "phone_number": "+49123456789"
    "storage": {
        "redis_host": "redis"
        "redis_port": 6379
    }
})
  • bot.listen(group_id, group_secret): Listen for messages in a group
  • bot.register(command): Register a new command
  • bot.start(): Start the bot
  • bot.send(receiver, text): Send a new message
  • bot.react(message, emoji): React to a message
  • bot.start_typing(receiver): Start typing
  • bot.stop_typing(receiver): Stop typing
  • bot.scheduler: APScheduler > AsyncIOScheduler, see here
  • bot.storage: In-memory or Redis stroage, see storage.py

Command

  • cmd.setup(): Start any task that requires to send messages already, optional
  • cmd.describe(): String to describe your command, optional
  • cmd.handle(context): Handle an incoming message. By default, any command will read any incoming message. Context can be used to easily reply (c.send(text)), react (c.react(emoji)) and to type in a group (c.start_typing() and c.stop_typing()).

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

signalbot-0.0.4.tar.gz (8.5 kB view hashes)

Uploaded Source

Built Distribution

signalbot-0.0.4-py3-none-any.whl (9.9 kB view hashes)

Uploaded 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