{"id":27944,"library":"mautrix","title":"mautrix","description":"A Python 3 asyncio Matrix framework for building Matrix clients and application services. Current version 0.21.0 supports Python 3.10+. The bridge module is deprecated in favor of Go rewrites. Release cadence is irregular, roughly quarterly.","status":"active","version":"0.21.0","language":"python","source_language":"en","source_url":"https://github.com/mautrix/python","tags":["matrix","asyncio","client","appservice","e2ee"],"install":[{"cmd":"pip install mautrix","lang":"bash","label":"Standard install"}],"dependencies":[{"reason":"HTTP client for Matrix API","package":"aiohttp","optional":false},{"reason":"Data classes for event types","package":"attrs","optional":false},{"reason":"URL handling","package":"yarl","optional":false}],"imports":[{"note":"","wrong":"","symbol":"Client","correct":"from mautrix.client import Client"},{"note":"","wrong":"","symbol":"AppService","correct":"from mautrix.appservice import AppService"},{"note":"","wrong":"","symbol":"OlmMachine","correct":"from mautrix.crypto import OlmMachine"},{"note":"","wrong":"","symbol":"RoomCreateEventContent","correct":"from mautrix.types import RoomCreateEventContent"}],"quickstart":{"code":"import asyncio\nfrom mautrix.client import Client\n\nasync def main():\n    client = Client(\"https://matrix.example.com\")\n    # Replace with actual access token\n    client.access_token = \"your_token_here\"\n    resp = await client.sync()\n    print(resp.rooms)\n\nasyncio.run(main())","lang":"python","description":"Basic Matrix client syncing rooms"},"warnings":[{"fix":"Migrate to Go-based bridges or use the client module directly.","message":"The `bridge` module is deprecated. All bridges are being rewritten in Go. See https://mau.fi/blog/2024-h1-mautrix-updates/","severity":"deprecated","affected_versions":">=0.20.5"},{"fix":"Use the built-in file-based state store or implement your own.","message":"The `state_store` SQLAlchemy implementations were removed in v0.20.0.","severity":"breaking","affected_versions":">=0.20.0"},{"fix":"Update your database URI accordingly.","message":"SQLite database URI format changed: `sqlite:///path.db` no longer works for relative paths. Use `sqlite:path.db` for relative, `sqlite:/path.db` for absolute.","severity":"breaking","affected_versions":">=0.20.0"},{"fix":"Upgrade Python to 3.10 or later.","message":"Python 3.9 support was dropped in v0.20.4. Use Python >=3.10.","severity":"gotcha","affected_versions":">=0.20.4"}],"env_vars":null,"last_verified":"2026-05-09T00:00:00.000Z","next_check":"2026-08-07T00:00:00.000Z","problems":[{"fix":"Use `from mautrix.client import Client`","cause":"Incorrect import path; Client is in the 'client' submodule.","error":"ImportError: cannot import name 'Client' from 'mautrix' (unknown location)"},{"fix":"Install with `pip install mautrix[crypto]`","cause":"Missing optional dependencies; crypto requires libolm.","error":"ModuleNotFoundError: No module named 'mautrix.crypto'"},{"fix":"Initialize with `Client('https://matrix.example.com')`","cause":"Client constructor requires base_url argument.","error":"TypeError: __init__() missing 1 required positional argument: 'base_url'"},{"fix":"Set a valid access token: `client.access_token = '...'`","cause":"Invalid or expired access token.","error":"mautrix.errors.MatrixError: M_UNKNOWN_TOKEN"}],"ecosystem":"pypi","meta_description":null,"install_score":null,"install_tag":null,"quickstart_score":null,"quickstart_tag":null}