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 groupbot.register(command)
: Register a new commandbot.start()
: Start the botbot.send(receiver, text)
: Send a new messagebot.react(message, emoji)
: React to a messagebot.start_typing(receiver)
: Start typingbot.stop_typing(receiver)
: Stop typingbot.scheduler
: APScheduler > AsyncIOScheduler, see herebot.storage
: In-memory or Redis stroage, seestorage.py
Command
cmd.setup()
: Start any task that requires to send messages already, optionalcmd.describe()
: String to describe your command, optionalcmd.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()
andc.stop_typing()
).
Project details
Release history Release notifications | RSS feed
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.5.tar.gz
(8.5 kB
view hashes)
Built Distribution
signalbot-0.0.5-py3-none-any.whl
(10.0 kB
view hashes)
Close
Hashes for signalbot-0.0.5-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 30b51ca4a4e8444f4fd9056e974051fe6c5cd89125d2b8c9ea79522052a5ae0b |
|
MD5 | 440318f26e4c8aa63e075d756d599341 |
|
BLAKE2b-256 | 4dff778517b55a5f0a4de0a3565e449ddd2118d1cc4fe77b683398bedd38d819 |