Python API client for signal-cli JSON-RPC
Project description
pysignalclijsonrpc - Python API client for signal-cli JSON-RPC
Python client for signal-cli 0.11.5+ native HTTP endpoint for JSON-RPC methods.
Installation
pip install pysignalclijsonrpc
Usage
Initalization
Default
from pysignalclijsonrpc.api import SignalCliJSONRPCApi
signal_cli_rest_api = SignalCliJSONRPCApi(
endpoint="http://localhost:3000/api/v1/rpc",
account="+1234567890" # one of your registered signal-cli accounts
)
Basic authentication
from pysignalclijsonrpc.api import SignalCliJSONRPCApi
signal_cli_rest_api = SignalCliJSONRPCApi(
endpoint="http://localhost:8080/api/v1/rpc",
account="+1234567890",
auth=("user", "password")
)
HTTPS w/ self-signed certificates
from pysignalclijsonrpc.api import SignalCliJSONRPCApi
signal_cli_rest_api = SignalCliJSONRPCApi(
endpoint="https://localhost:8443/api/v1/rpc",
account="+1234567890",
verify_ssl=False
)
Send message
Plain text message
signal_cli_rest_api.send_message("Test")
Plain text message w/ attachment from file
signal_cli_rest_api.send_message("Test", filenames=["/tmp/some-image.png"])
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
Built Distribution
Close
Hashes for pysignalclijsonrpc-22.11.9.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | fc3eabde71c1683a19d03a031f5710a7b94a6b28f898482e4170cefd2f9fd81a |
|
MD5 | eaa10c8ecf3a6dc1d5f3c0a8802d0e1d |
|
BLAKE2b-256 | e78939eaae767e34187086d2bb0f46bf09ce1f5349beccda5b739f8122c914eb |
Close
Hashes for pysignalclijsonrpc-22.11.9-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 8e59e02785bb0afe94780e0c8c215e9142f4a7cd50f4097887d6e403ddf04fba |
|
MD5 | 4b401be097a377a3f9264945d03cd600 |
|
BLAKE2b-256 | d43b4a825d15c3eaa373843997132877f40eeb05c6a4adfd4bff6a3d9618ee71 |