ASGI Server for the Matrix protocol
Project description
Matrix ASGI
with matrix-nio
Install
python3 -m pip install matrix-asgi
Use it in your app
You can look at the models.py and consumers.py files in the test application for a simple and quick example.
Start
Create a matrix user for the bot, and launch this server with the following arguments and/or environment variables (environment variables update defaults, arguments take precedence):
matrix-asgi
# OR
python -m matrix_asgi
usage: matrix-asgi [-h] [-u MATRIX_URL] -i MATRIX_ID -p MATRIX_PW [-v] application
Matrix ASGI Server.
positional arguments:
application The ASGI application instance to use as path.to.module:application
options:
-h, --help show this help message and exit
-u MATRIX_URL, --matrix-url MATRIX_URL
matrix homeserver url. Default: `https://matrix.org`.
Environment variable: `MATRIX_URL`
-i MATRIX_ID, --matrix-id MATRIX_ID
matrix user-id. Required.
Environment variable: `MATRIX_ID`
-p MATRIX_PW, --matrix-pw MATRIX_PW
matrix password. Required.
Environment variable: `MATRIX_PW`
-v, --verbose increment verbosity level
Unit tests
docker compose -f test.yml up --exit-code-from tests --force-recreate --build
JSON Specification
ref. spec.md
Changes
ref. CHANGELOG.md
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
matrix-asgi-1.0.0.tar.gz
(5.6 kB
view hashes)
Built Distribution
Close
Hashes for matrix_asgi-1.0.0-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | fac2f9482be74e74c37a41a0a854f9e65bf754ebd40365431dc624df478f7977 |
|
MD5 | 1f7ca0db94d85d0386d2112668737b6b |
|
BLAKE2b-256 | d74f95647ea98224e71a02a16829f4ed2f503e817b866b250e65cb7dfdd5ea30 |