A simple, developer-friendly library to create Matrix bots.
http://matrixpy.codesociety.xyz/ โ// momentum
+1โ since featured on SilentStars (2026-08-30)
featured in
- Edition #21 back first commit in 63 days ยท closed 1 issue
- Edition #10 new featured on Bluesky
// why it's here
- Has issues labelled for new contributors
- Health 73/100 with only 15 stars
// how to help
// readme
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.
- Minimal setup โ install and have a working bot running in minutes
- Event-driven โ async/await API reacting to any Matrix room event
- Command system โ decorator-based commands with automatic argument parsing
- Extensions โ split your bot into modules as it grows
Quickstart
Requirements: Python 3.10+
pip install matrix-python
Using a virtual environment is strongly recommended:
python -m venv venv
source venv/bin/activate # Windows: venv\Scripts\activate
pip install matrix-python
Create a config.yml:
USERNAME: "@yourbot:matrix.org"
PASSWORD: "your_password"