Metadata-Version: 2.5
Name: signalbot
Version: 2.2.1
Summary: A Python framework for building Signal bots
Project-URL: repository, https://github.com/signalbot-org/signalbot
Author: René Filip
Maintainer: René Filip, Gara Dorta
License-Expression: MIT
License-File: LICENSE
Keywords: Bot,Framework,Home Automation,Signal
Classifier: Operating System :: OS Independent
Classifier: Programming Language :: Python :: 3
Requires-Python: >=3.11
Requires-Dist: aiohttp>=3.11.9
Requires-Dist: anyio>=4.13.0
Requires-Dist: apscheduler>=3.11.0
Requires-Dist: packaging>=25.0
Requires-Dist: phonenumbers>=8.13.54
Requires-Dist: pydantic>=2.12.3
Requires-Dist: pyyaml>=6.0.3
Requires-Dist: websockets>=14.1
Provides-Extra: redis
Requires-Dist: redis>=5.2.0; extra == 'redis'
Description-Content-Type: text/markdown

<picture>
  <source media="(prefers-color-scheme: dark)" srcset="https://raw.githubusercontent.com/signalbot-org/signalbot/main/docs/assets/banner-dark.svg">
  <source media="(prefers-color-scheme: light)" srcset="https://raw.githubusercontent.com/signalbot-org/signalbot/main/docs/assets/banner-light.svg">
  <img alt="signalbot" src="https://raw.githubusercontent.com/signalbot-org/signalbot/main/docs/assets/banner-light.svg" width="430">
</picture>
<br>
<br>

[![PyPI Downloads](https://img.shields.io/pypi/dm/signalbot?label=Downloads
)](https://pypistats.org/packages/signalbot)
[![Version](https://img.shields.io/pypi/v/signalbot?logo=python&logoColor=white&label=PyPI)](https://pypi.python.org/pypi/signalbot)
[![License](https://img.shields.io/pypi/l/signalbot.svg?label=License)](https://pypi.python.org/pypi/signalbot)
[![CI](https://github.com/signalbot-org/signalbot/actions/workflows/ci.yaml/badge.svg)](https://github.com/signalbot-org/signalbot/actions/workflows/ci.yaml)
[![codecov](https://codecov.io/gh/signalbot-org/signalbot/graph/badge.svg?token=N3ZA5MTU2P)](https://codecov.io/gh/signalbot-org/signalbot)

A Python framework for Signal bots. You write handlers for the events you care about, like messages or reactions,
and respond by sending your own messages and reactions, or by creating polls. It talks to Signal through
[signal-cli-rest-api](https://github.com/bbernhard/signal-cli-rest-api) and comes with test helpers, so you can
test your bot without a real Signal account.

## Installation

See the [getting started](https://signalbot-org.github.io/signalbot/latest/01_getting_started) section in the documentation.

## Minimal bot

This is what a minimal bot using signalbot looks like:

```python
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](https://signalbot-org.github.io/signalbot/) for more details.
