evoid-maubot
EVOID adapter for maubot — generic framework for building Matrix bots with EVOID IOP.
What It Does
Provides a base EvoidMaubot class that handles:
- Matrix event → EVOID Intent conversion
- Command routing and permission checking
- SQLite/Smart Storage initialization
- EVOID service lifecycle (start/stop)
Jitsi-specific commands are NOT included — they live in matrix-jitsi-bot/services/matrixbot/.
Installation
pip install evoid-maubot
# With storage
pip install evoid-maubot[storage]
Quick Start
# mybot.py
from evoid_maubot import EvoidMaubot
from evoid_maubot.commands import CommandDef, COMMAND_REGISTRY, parse_required_one
# Define your commands
COMMAND_REGISTRY.update({
"greet": CommandDef(
description="Greet someone",
usage="<name>",
category="Social",
arg_parser=parse_required_one,
),
})
class MyBot(EvoidMaubot):
def _command_prefix(self) -> str:
return "mybot" # !mybot greet Alice
def _intent_prefix(self) -> str:
return "mybot" # Intent: mybot:greet
def _make_handler(self, cmd_name: str):
async def handler(intent):
name = intent.metadata.get("args", {}).get("value", "world")
return {"status": "executed", "greeting": f"Hello, {name}!"}
return handler
def _make_intent(self, subcommand, cmd_def, args, event):
intent = super()._make_intent(subcommand, cmd_def, args, event)
intent.metadata["custom_field"] = "value"
return intent
# Register as maubot plugin
def setup():
return MyBot
Configuration
service_name: mybot
command_prefix: mybot
storage:
db_path: mybot.db
enable_smart_routing: true
smart_mapping:
mydata: storage.sqlite
smart_schemas:
mydata: ["id", "field1", "field2"]
admin_whitelist:
- "@admin:example.com"
Architecture
Matrix Event (!mybot greet Alice)
↓
EvoidMaubot.on_message() — Adapter
↓
Intent(name="mybot:greet", level=STANDARD, metadata={...})
↓
EVOID Pipeline: validate → authorize → handler
↓
Handler returns: {"greeting": "Hello, Alice!"}
↓
Matrix Reply
Extending
Override these methods in your subclass:
| Method | Purpose |
|---|---|
_command_prefix() |
Matrix command prefix (default: "bot") |
_intent_prefix() |
EVOID intent namespace (default: "bot") |
_register_intents() |
Register custom intents |
_make_handler(cmd) |
Create EVOID handler for command |
_make_intent(...) |
Build Intent from command |
_on_command(event, args) |
Custom command dispatch |
_on_result(cmd, args, event, result) |
Post-result hook (persistence) |
_is_moderator(user_id) |
Moderator check |
_help_text() |
Custom help output |
Storage
Optional persistence via evoid-sqlite and evoid-smart-storage:
pip install evoid-maubot[storage]
Configure storage.smart_mapping and storage.smart_schemas in config.
Development
uv venv && uv pip install -e ".[dev]"
ruff check evoid_maubot/
ruff format evoid_maubot/
pytest tests/ -v
License
Apache-2.0
Metadata
Release files for evoid-maubot 1.0.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| evoid_maubot-1.0.0-py3-none-any.whl | Python 3 | none | any | Details for evoid_maubot-1.0.0-py3-none-any.whl |
Release files / evoid_maubot-1.0.0-py3-none-any.whl
| Download URL | evoid_maubot-1.0.0-py3-none-any.whl |
|---|---|
| Size | 6.9 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
37d5f19e78ca0fcac1843a7e83595d81d8dca187aa304164ba7f16b1abc94afc
|
|
BLAKE2b-256 checksum How to use checksums |
a99b7624c35a234ed2bf32df8e6e913825d7eb1c88c4699ddeb954f2620929dc
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.12.4 {"installer":{"name":"uv","version":"0.12.4","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}
|
Security for evoid-maubot 1.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.