A Python 3 asyncio Matrix framework.
Go to file
Joe Groocock 8eca64ed1d
Support MSC2530 fields in media event types (#170)
Add `filename`, `format` and `formatted_body` to media event content
types.

Signed-off-by: Joe Groocock <me@frebib.net>
2024-03-28 10:34:17 +02:00
.github/workflows Update Black to 2024 style and Python 3.10 target 2024-01-29 18:48:49 +02:00
docs Remove SQLAlchemy state store stuff. Fixes #147 2023-05-24 20:16:18 +03:00
mautrix Support MSC2530 fields in media event types (#170) 2024-03-28 10:34:17 +02:00
.editorconfig Don't trim whitespace in md files in editorconfig 2022-01-26 12:55:44 +02:00
.gitignore Update gitignore 2018-10-14 22:34:42 +03:00
.gitlab-ci.yml Fix directory name 2021-11-21 23:18:52 +02:00
.pre-commit-config.yaml Update Black to 2024 style and Python 3.10 target 2024-01-29 18:48:49 +02:00
CHANGELOG.md Bump version to 0.20.4 2024-01-09 14:14:58 +02:00
LICENSE LICENSE: remove trailing space and newline 2022-01-21 10:01:43 -07:00
MANIFEST.in Add changelog link to PyPI 2021-12-28 13:46:37 +02:00
README.rst Mark Python 3.12 as supported 2023-11-26 20:12:39 +02:00
dev-requirements.txt Update Black to 2024 style and Python 3.10 target 2024-01-29 18:48:49 +02:00
optional-requirements.txt Bump version to 0.19.3 2023-01-27 15:07:37 +02:00
pyproject.toml Update Black to 2024 style and Python 3.10 target 2024-01-29 18:48:49 +02:00
requirements.txt Remove typing_extensions usage 2022-02-20 14:01:21 +02:00
setup.py Update missed version 2024-01-29 18:49:28 +02:00

README.rst

mautrix-python
==============

|PyPI| |Python versions| |License| |Docs| |Code style| |Imports|

A Python 3.10+ asyncio Matrix framework.

Matrix room: `#maunium:maunium.net`_


Components
----------

* Basic HTTP request sender (mautrix.api_)

* `Client API`_ endpoints as functions (mautrix.client.api_)

* Medium-level application service framework (mautrix.appservice_)

  * Basic transaction and user/alias query support (based on Cadair's python-appservice-framework_)
  * Basic room state storage
  * Intent wrapper around the client API functions (design based on matrix-appservice-bridge)

* Medium-level end-to-end encryption framework (mautrix.crypto_)

  * Handles all the complicated e2ee key exchange
  * Uses libolm through python-olm for the low-level crypto

* High-level bridging utility framework (mautrix.bridge_)

  * Base class for bridges
  * Common bridge configuration and appservice registration generation things
  * Double-puppeting helper
  * End-to-bridge encryption helper

* High-level client framework (mautrix.client_)

  * Syncing and event handling helper.
  * End-to-end encryption helper.

* Utilities (mautrix.util_)

  * Matrix HTML parsing and generating utilities
  * Manhole system (get a python shell in a running process)
  * YAML config helpers
  * Database helpers (new: asyncpg, legacy: SQLAlchemy)
  * Color logging utility
  * Very simple HMAC-SHA256 utility for signing tokens (like JWT, but hardcoded to use a single good algorithm)

.. _#maunium:maunium.net: https://matrix.to/#/#maunium:maunium.net
.. _python-appservice-framework: https://github.com/Cadair/python-appservice-framework/
.. _Client API: https://matrix.org/docs/spec/client_server/r0.6.1.html

.. _mautrix.api: https://docs.mau.fi/python/latest/api/mautrix.api.html
.. _mautrix.client.api: https://docs.mau.fi/python/latest/api/mautrix.client.api.html
.. _mautrix.appservice: https://docs.mau.fi/python/latest/api/mautrix.appservice/index.html
.. _mautrix.bridge: https://docs.mau.fi/python/latest/api/mautrix.bridge/index.html
.. _mautrix.client: https://docs.mau.fi/python/latest/api/mautrix.client.html
.. _mautrix.crypto: https://docs.mau.fi/python/latest/api/mautrix.crypto.html
.. _mautrix.util: https://docs.mau.fi/python/latest/api/mautrix.util/index.html

.. |PyPI| image:: https://img.shields.io/pypi/v/mautrix.svg
   :target: https://pypi.python.org/pypi/mautrix
   :alt: PyPI: mautrix
.. |Python versions| image:: https://img.shields.io/pypi/pyversions/mautrix.svg
.. |License| image:: https://img.shields.io/github/license/mautrix/python.svg
   :target: https://github.com/mautrix/python/blob/master/LICENSE
   :alt: License: MPL-2.0
.. |Docs| image:: https://img.shields.io/gitlab/pipeline-status/mautrix/python?branch=master&gitlab_url=https%3A%2F%2Fmau.dev&label=docs
   :target: https://docs.mau.fi/python/latest/
.. |Code style| image:: https://img.shields.io/badge/code%20style-black-000000.svg
   :target: https://github.com/psf/black
.. |Imports| image:: https://img.shields.io/badge/%20imports-isort-%231674b1?style=flat&labelColor=ef8336
   :target: https://pycqa.github.io/isort/