Python bindings for signald
Project description
Signald python bindings
Most of the content here is generated by util/generate_api.py
that uses
the output of the 'protocol' request of the signald API.
Since this output is incomplete, a few manual additions are present in pysignald_async/api.py
.
Install
Right now, clone
this, poetry build
, pip install dist/*.whl
.
Very soon: pypi package.
Usage
An example can be found in this signal/XMPP gateway.
import asyncio
from pysignald_async import SignaldAPI
async def main():
loop = asyncio.get_running_loop()
_, signald = await loop.create_unix_connection(
SignaldAPI, path=SIGNALD_SOCKET_PATH)
await signald.register(username="+XXXXXX")
# Some async code to get the SMS code
await signald.verify(username="+XXXXXX", code=code)
await signald.on_con_lost
SIGNALD_SOCKET_PATH = "/var/run/signald/signald.sock"
asyncio.run(main())
TODO: Write a better README
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
pysignald-async-0.1.0.tar.gz
(10.1 kB
view hashes)
Built Distribution
Close
Hashes for pysignald_async-0.1.0-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 041502f9cb7452a484cbdd8aeb75be18720929ef098e654f5ba69ce68ba01340 |
|
MD5 | 68c7135be592ecae1268c1c94a713fca |
|
BLAKE2b-256 | e6b75a582c8443871495585fa2f027ff1aa71a775ce8ce0ab76edf2394d85e31 |