Skip to main content

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:

Note: the Matrix Python SDK project status strongly recommends using matrix-nio rather than the Matrix Python SDK. Thus, consider using nuqql-matrixd-nio that uses matrix-nio rather than nuqql-matrixd.

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.
  • retrieve the list of accounts and their numbers/IDs with account list.
  • retrieve your buddy/room list with account <id> buddies or account <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 [--address ADDRESS] [--af {inet,unix}] [-d] [--dir DIR]
[--disable-history] [--filter-own] [-h] [--loglevel {debug,info,warn,error}]
[--port PORT] [--push-accounts] [--sockfile SOCKFILE] [--version]

Run nuqql backend matrixd.

optional arguments:
  --address ADDRESS     set AF_INET listen address
  --af {inet,unix}      set socket address family: "inet" for AF_INET, "unix"
                        for AF_UNIX
  -d, --daemonize       daemonize process
  --dir DIR             set working directory
  --disable-history     disable message history
  --filter-own          enable filtering of own messages
  -h, --help            show this help message and exit
  --loglevel {debug,info,warn,error}
                        set logging level
  --port PORT           set AF_INET listen port
  --push-accounts       enable pushing accounts to client
  --sockfile SOCKFILE   set AF_UNIX socket file in DIR
  --version             show program's version number and exit

Changes

  • v0.5.0:
    • Update nuqql-based to v0.3.0, switch to asyncio, require python version >= 3.7.
    • Add welcome and account adding help messages.
    • Disable filtering of own messages, rewrite sender of own messages to <self>
  • 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 to debug, info, warn, or error. Default: warn.
    • Make daemon python module optional
    • Fixes and improvements
  • 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

nuqql-matrixd-0.5.0.tar.gz (13.2 kB view details)

Uploaded Source

Built Distribution

nuqql_matrixd-0.5.0-py3-none-any.whl (13.1 kB view details)

Uploaded Python 3

File details

Details for the file nuqql-matrixd-0.5.0.tar.gz.

File metadata

  • Download URL: nuqql-matrixd-0.5.0.tar.gz
  • Upload date:
  • Size: 13.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.3.0 pkginfo/1.6.1 requests/2.25.1 setuptools/49.2.1 requests-toolbelt/0.9.1 tqdm/4.55.1 CPython/3.9.1

File hashes

Hashes for nuqql-matrixd-0.5.0.tar.gz
Algorithm Hash digest
SHA256 bde7077b8de17f7a4b51a6ebac4eabeac3347cf7d8742cad03068543e4738073
MD5 194bcdcad584194e7f66a3e28c94b463
BLAKE2b-256 029413ab5e05099bc5229118be6c6d26a2a45fe18a8e680bee2c11c0fb563dd4

See more details on using hashes here.

Provenance

File details

Details for the file nuqql_matrixd-0.5.0-py3-none-any.whl.

File metadata

  • Download URL: nuqql_matrixd-0.5.0-py3-none-any.whl
  • Upload date:
  • Size: 13.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.3.0 pkginfo/1.6.1 requests/2.25.1 setuptools/49.2.1 requests-toolbelt/0.9.1 tqdm/4.55.1 CPython/3.9.1

File hashes

Hashes for nuqql_matrixd-0.5.0-py3-none-any.whl
Algorithm Hash digest
SHA256 06f0bf7688f029773325dee3401cef5dcb95152bd0c81c8c458286903506bccd
MD5 9b9c4c75725c7fc9e61d274a78aa2136
BLAKE2b-256 71b9b6805b30200c5d3bcde102440257358028e826ba276513cd2d2ae2e239a7

See more details on using hashes here.

Provenance

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page