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.3.tar.gz
(20.1 kB
view hashes)
Built Distribution
signalbot-0.0.3-py3-none-any.whl
(21.5 kB
view hashes)
Close
Hashes for signalbot-0.0.3-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | b8e281530725e6e6c079a2d6600ce1ae738ebc538d526cb48897091fc595a37d |
|
MD5 | dbf1f99c3a75593980f980232d1ee2da |
|
BLAKE2b-256 | 327ec4fc219add7f0e0ba48575dfc060e2ead191e133c8ab9785fb2ae8ec61db |