Python bindings for signald
Project description
Signald python bindings
Most of the content here is generated by the generate.py
script that
uses https://signald.org/protocol.json.
Install
pip install aiosignald
Have signald running. See their docs about it.
Issue tracker: https://todo.sr.ht/~nicoco/aiosignald
Part of the slidge project (but can be used independently)
Usage
Example: registration
import asyncio
from aiosignald 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
# See https://signald.org/articles/protocol/ for more info about this
SIGNALD_SOCKET_PATH = "/var/run/signald/signald.sock"
asyncio.run(main())
Docs are available on readthedocs.
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
aiosignald-0.2.1.tar.gz
(29.2 kB
view hashes)
Built Distribution
aiosignald-0.2.1-py3-none-any.whl
(29.8 kB
view hashes)
Close
Hashes for aiosignald-0.2.1-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | d658f452572a015cf0a0df7195880ab38cf8cfa9785be1a15135e0e964dade05 |
|
MD5 | 3072b0735f55e0c1c6d1c3517b166ea9 |
|
BLAKE2b-256 | 2059376f99d4f5670383a84b9983e044ed7e712a71fb0eb592c6f139c42359e0 |