Skip to content

Components playground

Use this page to preview the authoring building blocks before committing them to guides.

Badges & macros

  • Inline badge: Beta
  • Experimental badge: Experimental
  • CTA macro: Open API

Admonitions

PII redaction

Incoming messages are redacted by default. Override with caution.

Backpressure

If the inbound queue exceeds the high watermark, new messages are deferred to protect upstream signal-cli.

Tabs

poetry run mkdocs serve
docker run -it --rm -p 8000:8000 -v $PWD:/docs squidfunk/mkdocs-material

Cards & grids

:material-rocket: Deploy
See [Operations & deployment](../guides/production_deployment.md)
:material-code-tags: API reference
Jump to [API reference](../reference/api.md)
:material-alert-decagram: Release guardrails
Follow [Release & publishing](../guides/release.md)

Annotated code

"""Minimal ping/pong bot to verify your Signal setup."""

from __future__ import annotations

import asyncio

from signal_client import Context, SignalClient, command


@command("!ping")
async def ping(ctx: Context) -> None:
    """Reply with a basic pong."""
    await ctx.reply_text("pong")  # (1)


async def main() -> None:
    """Run the ping bot."""
    bot = SignalClient()  # (2)
    bot.register(ping)  # (3)
    await bot.start()  # (4)


if __name__ == "__main__":
    asyncio.run(main())

Diagrams

flowchart TD
    A[Signal message] --> B[signal-cli-rest-api]
    B --> C[signal-client ingestion]
    C --> D{Backpressure?}
    D -- yes --> E[Delay + retry]
    D -- no --> F[Dispatch handler]
    F --> G[Send reply/attachment]