An easy-to-use Matrix bot framework designed for quick development and minimal setup
Project description
Matrix.py is a lightweight and intuitive Python library to build bots on the Matrix protocol. It provides a clean, decorator-based API similar to popular event-driven frameworks, allowing developers to focus on behavior rather than boilerplate.
Key Features
- Minimal setup, easy to extend
- Event-driven API using async/await
- Clean command registration
- Automatic event handler registration
- Built on matrix-nio
Quickstart
Requirements
- Python 3.10+
pip install matrix-python
If you plan on contributing to matrix.py, we recommend to install the development libraries:
pip install -e .[dev]
Note: It is recommended to use a virtual environment when installing python packages.
from matrix import Bot, Context
bot = Bot(config="config.yml")
@bot.command("ping")
async def ping(ctx: Context):
await ctx.send("Pong!")
bot.start()
Contributing
We welcome everyone to contribute!
Whether it's fixing bugs, suggesting features, or improving the docs - every bit helps.
If you intend to contribute, please read the CONTRIBUTING.md first. Additionally, every contributor is expected to follow the code of conduct.
License
matrix.py is released under GPL-3.0
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
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file matrix_python-1.4.0a0.tar.gz.
File metadata
- Download URL: matrix_python-1.4.0a0.tar.gz
- Upload date:
- Size: 84.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
736a4e14f88c450d7805e637e969b11e3bee28b2dc4fffd9308d68ff160a37da
|
|
| MD5 |
f35960441911a12dfcbd75d3fa6a2b4d
|
|
| BLAKE2b-256 |
a9bf2cdad3ed70e62b6b919f02e27ffa63a15f9c29b7b07be0e8d55e7704dc03
|
Provenance
The following attestation bundles were made for matrix_python-1.4.0a0.tar.gz:
Publisher:
publish.yml on Code-Society-Lab/matrixpy
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
matrix_python-1.4.0a0.tar.gz -
Subject digest:
736a4e14f88c450d7805e637e969b11e3bee28b2dc4fffd9308d68ff160a37da - Sigstore transparency entry: 1240529993
- Sigstore integration time:
-
Permalink:
Code-Society-Lab/matrixpy@9a7d62be9a865d2794faa3c528d41468a836f2a7 -
Branch / Tag:
refs/tags/1.4.0-alpha - Owner: https://github.com/Code-Society-Lab
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@9a7d62be9a865d2794faa3c528d41468a836f2a7 -
Trigger Event:
release
-
Statement type:
File details
Details for the file matrix_python-1.4.0a0-py3-none-any.whl.
File metadata
- Download URL: matrix_python-1.4.0a0-py3-none-any.whl
- Upload date:
- Size: 41.1 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
c6e7f718cd7909cf0c0cae3ec7f590ad37da486518de0f9afde04c7ea6bb08d2
|
|
| MD5 |
f26b3651c368c62adce5ab417deefe32
|
|
| BLAKE2b-256 |
30217bb2352be355202fd38cb8e7e8d2373425a6a3c777100a83847732c672a9
|
Provenance
The following attestation bundles were made for matrix_python-1.4.0a0-py3-none-any.whl:
Publisher:
publish.yml on Code-Society-Lab/matrixpy
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
matrix_python-1.4.0a0-py3-none-any.whl -
Subject digest:
c6e7f718cd7909cf0c0cae3ec7f590ad37da486518de0f9afde04c7ea6bb08d2 - Sigstore transparency entry: 1240530016
- Sigstore integration time:
-
Permalink:
Code-Society-Lab/matrixpy@9a7d62be9a865d2794faa3c528d41468a836f2a7 -
Branch / Tag:
refs/tags/1.4.0-alpha - Owner: https://github.com/Code-Society-Lab
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@9a7d62be9a865d2794faa3c528d41468a836f2a7 -
Trigger Event:
release
-
Statement type: