Matrix client network daemon using the Matrix Python SDK
Project description
nuqql-matrixd
nuqql-matrixd is a network daemon that implements the nuqql interface and uses the Matrix Python SDK to connect to Matrix chat networks. It can be used as a backend for nuqql or as a standalone chat client daemon.
nuqql-matrixd's dependencies are:
- nuqql-based
- Matrix Python SDK
- daemon (optional)
Quick Start
You can install nuqql-matrixd and its dependencies, for example, with pip for your user only with the following command:
$ pip install --user nuqql-matrixd
After the installation, you can run nuqql-matrixd by running the
nuqql-matrixd
command:
$ nuqql-matrixd
By default, it listens on TCP port 32000 on your local host. So, you can connect with, e.g., telnet to it with the following command:
$ telnet localhost 32000
In the telnet session you can:
- add Matrix accounts with:
account add matrix <account> <password>
.- Note: the format of
<account>
is<username>@<homeserver>
, e.g.,dummy_user@matrix.org
.
- Note: the format of
- retrieve the list of accounts and their numbers/IDs with
account list
. - retrieve your buddy/room list with
account <id> buddies
oraccount <id> chat list
- send a message to a room with
account <id> chat send <room> <message>
Usage
See nuqql-matrixd --help
for a list of command line arguments:
usage: nuqql-matrixd [-h] [--version] [--af {inet,unix}] [--address ADDRESS]
[--port PORT] [--sockfile SOCKFILE] [--dir DIR] [-d] [--loglevel
{debug,info,warn,error}] [--disable-history]
Run nuqql backend.
optional arguments:
-h, --help show this help message and exit
--version show program's version number and exit
--af {inet,unix} socket address family: "inet" for AF_INET, "unix" for
AF_UNIX
--address ADDRESS AF_INET listen address
--port PORT AF_INET listen port
--sockfile SOCKFILE AF_UNIX socket file in DIR
--dir DIR working directory
-d, --daemonize daemonize process
--loglevel {debug,info,warn,error}
Logging level
--disable-history disable message history
Changes
- v0.4.0:
- Update nuqql-based to v0.2.0
- v0.3:
- Use nuqql-based as dependency and adapt to nuqql-based changes
- Add setup.py for installation and package distribution
- Add python type annotations
- Restructure code
- Cleanups, fixes, and improvements
- v0.2:
- Allow specification of the homeserver url in the account user when adding
an account. Thus, the following account users are possible:
<user>@<domain>
(defaults to https)<user>@http://<domain>[:<port>]
<user>@https://<domain>[:<port>]
- Save sync token for each account in a file. So, only messages newer than the last sync are retrieved after a restart of the backend.
- Add new commands:
bye
: disconnect from the backend.quit
: quit the backend.help
: show list of commands and their description.
- Add and use "chat msg" message format for group chat messages
- Store accounts in .ini file
accounts.ini
in the backend's working directory. Note: existing accounts have to be re-added to the backend to be usable with the .ini file. - Add configuration file support: in addition to the command line arguments,
configuration parameters can now be set in the .ini file
config.ini
in the backend's working directory. - Add
loglevel
configuration parameter to command line arguments and configuration file for setting the logging level todebug
,info
,warn
, orerror
. Default:warn
. - Make daemon python module optional
- Fixes and improvements
- Allow specification of the homeserver url in the account user when adding
an account. Thus, the following account users are possible:
- v0.1:
- First/initial release.
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
Built Distribution
File details
Details for the file nuqql-matrixd-0.4.0.tar.gz
.
File metadata
- Download URL: nuqql-matrixd-0.4.0.tar.gz
- Upload date:
- Size: 13.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.2.0 pkginfo/1.6.0 requests/2.24.0 setuptools/49.2.1 requests-toolbelt/0.9.1 tqdm/4.50.2 CPython/3.9.0
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 97d14a1494b5b18c1cc88dfb8d903c0140cc23481381fc561583f3728a20c394 |
|
MD5 | 3bf093d530b44fe2194fe22171e8f561 |
|
BLAKE2b-256 | 55475e2f8cbb7554b29675b3f095cccd2db6fe0a5d48e94318a31d94d97d62da |
Provenance
File details
Details for the file nuqql_matrixd-0.4.0-py3-none-any.whl
.
File metadata
- Download URL: nuqql_matrixd-0.4.0-py3-none-any.whl
- Upload date:
- Size: 13.2 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.2.0 pkginfo/1.6.0 requests/2.24.0 setuptools/49.2.1 requests-toolbelt/0.9.1 tqdm/4.50.2 CPython/3.9.0
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 82210c2a931cb1059d2453d1c196a1eebc839473aff2eecad16da66c571df316 |
|
MD5 | 692c0427cb2e22dced1bdd7ba47670b2 |
|
BLAKE2b-256 | b5c246189a3811227ffe7ecfb7c76331903724559bd58fa58753f444b8bbe9d3 |