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.8.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | 109f6701a2816acd4caffadde171b6add3542330f29462ecfb4c66e33bb0676f |
|
MD5 | 2553d2ca1ce1f7957bdc3d47b93aded2 |
|
BLAKE2b-256 | 113fc0aba4c5bc86c1cccd199872b487896488240cdf6ff85695f350d4766b12 |
Close
Hashes for pysignalclijsonrpc-22.11.8-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 5f5d2c06549a6d2c7f04bd714e6696ef03ef238db0c13573881988cfbf65ed6e |
|
MD5 | 61030c922c192c34426472a9cf821200 |
|
BLAKE2b-256 | f81528043143ed5733c11a5fa689f69d077b32ac96240398a9acb2351dae9e1c |