Skip to main content

Async Python framework for resilient Signal bots. Build fast on `bbernhard/signal-cli-rest-api` with typed helpers, resilient ingestion, and observability baked in.

Project description

signal-client

PyPI version Python versions License Docs

Async Python framework for resilient Signal bots. Build fast on bbernhard/signal-cli-rest-api with typed helpers, resilient ingestion, and observability baked in.

Features

  • Resilience First: Backpressure, DLQ retries, and rate/circuit breakers keep handlers stable during bursts.
  • Typed Context Helpers: Replies, reactions, attachments, locks, and receipts all live on one ergonomic context.
  • Operations Ready: Health and metrics servers, structured logging with PII redaction, and storage options (memory, SQLite, Redis).

Quick Start

1. Prerequisites

  • A Signal phone number registered with signal-cli.
  • A running bbernhard/signal-cli-rest-api instance.
  • Export these environment variables:
    export SIGNAL_PHONE_NUMBER="+15551234567"
    export SIGNAL_SERVICE_URL="http://localhost:8080"
    export SIGNAL_API_URL="http://localhost:8080"
    

2. Install

# Using poetry
poetry add signal_client

# Using pip
pip install signal-client

3. Create a Bot

import asyncio
from signal_client import SignalClient, command

@command("!ping")
async def ping(ctx):
    await ctx.reply_text("pong")

async def main():
    bot = SignalClient()
    bot.register(ping)
    await bot.start()

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

4. Run It

python your_bot_file.py

Documentation

For full guides, examples, and API references, see the official docs site.

Contributing

Contributions are welcome! Please open an issue or submit a pull request.

  • Set up your development environment with poetry install.
  • Activate pre-commit hooks with poetry run pre-commit install.

License

This project is licensed under the MIT License - see the LICENSE file for details.

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

signal_client-0.1.6.tar.gz (58.9 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

signal_client-0.1.6-py3-none-any.whl (89.5 kB view details)

Uploaded Python 3

File details

Details for the file signal_client-0.1.6.tar.gz.

File metadata

  • Download URL: signal_client-0.1.6.tar.gz
  • Upload date:
  • Size: 58.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for signal_client-0.1.6.tar.gz
Algorithm Hash digest
SHA256 a3d1801cfef0bf2d6ca41e0022e72a941ec301a4078faca7498dcce4feddaec0
MD5 650a83c0a031f928d4c4d6324f719fc2
BLAKE2b-256 12610075997c951d2f63762526b7ef5d3d8efe7e1676b22946562fbd8049f5a2

See more details on using hashes here.

Provenance

The following attestation bundles were made for signal_client-0.1.6.tar.gz:

Publisher: release.yml on cornellsh/signal-client

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file signal_client-0.1.6-py3-none-any.whl.

File metadata

  • Download URL: signal_client-0.1.6-py3-none-any.whl
  • Upload date:
  • Size: 89.5 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for signal_client-0.1.6-py3-none-any.whl
Algorithm Hash digest
SHA256 a451086527ccdea059c16d0954c618eba407e2c4a29501165d9badc87e89f903
MD5 03d2691bc08859329ae438e279873776
BLAKE2b-256 37a38bbcec4fc0421e2f1ccf1c8e6277f2bbcadc8eb9902b80e9d7aab828867b

See more details on using hashes here.

Provenance

The following attestation bundles were made for signal_client-0.1.6-py3-none-any.whl:

Publisher: release.yml on cornellsh/signal-client

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page