Skip to main content

Matrix ASGI

Tests Lints Release pre-commit.ci status

Code style: black codecov Maintainability PyPI version

with matrix-nio

#matrix-asgi:laas.fr

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

Metadata

Release files for matrix-asgi 2.0.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for matrix-asgi 2.0.0
File Size Uploaded Provenance Actions
matrix_asgi-2.0.0.tar.gz 5.5 kB Without provenance Details for matrix_asgi-2.0.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for matrix-asgi 2.0.0
File Interpreter ABI Platform Actions
matrix_asgi-2.0.0-py3-none-any.whl Python 3 none any Details for matrix_asgi-2.0.0-py3-none-any.whl

Total release size: 12.1 kB

Release files / matrix_asgi-2.0.0.tar.gz

Download URL matrix_asgi-2.0.0.tar.gz
Size 5.5 kB
Tags Source
SHA-256 checksum
How to use checksums
22b5618d59f6d699304d6df91ae6d57076ec3c9b747b5d26e05b55ee5a73bb2e
BLAKE2b-256 checksum
How to use checksums
c52886e704aa25ee3cae1556155345737b2f0b5a0df17d5c2bec3b6a71d06800
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.2 CPython/3.10.9

Release files / matrix_asgi-2.0.0-py3-none-any.whl

Download URL matrix_asgi-2.0.0-py3-none-any.whl
Size 6.6 kB
Tags Python 3
SHA-256 checksum
How to use checksums
03b492217569d6bcabd04b0a85edf618d4927380a6f17a350c25bbfba8a38a5f
BLAKE2b-256 checksum
How to use checksums
f55ca6c9dd3e5aefa0b806a79fcced304c9a9a2d190e50ddbe2b4fd1107d048d
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.2 CPython/3.10.9

Security for matrix-asgi 2.0.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page