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-2.0.0.tar.gz
(5.5 kB
view details)
Built Distribution
File details
Details for the file matrix_asgi-2.0.0.tar.gz
.
File metadata
- Download URL: matrix_asgi-2.0.0.tar.gz
- Upload date:
- Size: 5.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.10.9
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 22b5618d59f6d699304d6df91ae6d57076ec3c9b747b5d26e05b55ee5a73bb2e |
|
MD5 | 059bb3814657554e0ffdff3f0d3543e4 |
|
BLAKE2b-256 | c52886e704aa25ee3cae1556155345737b2f0b5a0df17d5c2bec3b6a71d06800 |
File details
Details for the file matrix_asgi-2.0.0-py3-none-any.whl
.
File metadata
- Download URL: matrix_asgi-2.0.0-py3-none-any.whl
- Upload date:
- Size: 6.6 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.10.9
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 03b492217569d6bcabd04b0a85edf618d4927380a6f17a350c25bbfba8a38a5f |
|
MD5 | b11281ed9e839226699e6471e2e99098 |
|
BLAKE2b-256 | f55ca6c9dd3e5aefa0b806a79fcced304c9a9a2d190e50ddbe2b4fd1107d048d |