Mattermostdriver is a Python library providing a client for the Mattermost API. It enables developers to interact with Mattermost servers, manage users, channels, posts, and more. The current version is 7.3.2, and it maintains an active release cadence with regular updates and bug fixes.
pip install mattermostdriverVerified import paths — ran on the pinned version, not inferred.
This quickstart demonstrates how to initialize the `Driver`, log in using username/password (or token if provided via environment variable `MATTERMOST_TOKEN`), retrieve the current user's information, and then log out. Ensure your Mattermost server details and credentials are set as environment variables or passed directly to the Driver constructor.
Upgrade your Python environment to version 3.5 or higher. Alternatively, pin your mattermostdriver dependency to `<7.0.0` if you cannot upgrade Python.
Upgrade to mattermostdriver version 7.3.2 or later to benefit from the fixes related to authentication stability.
Upgrade to mattermostdriver version 7.3.1 or later to ensure reliable WebSocket disconnection.
Carefully manage your project's dependency tree. Consider using `pip install --no-deps` for mattermostdriver and manually installing compatible versions of `requests` and `websockets` if conflicts arise. Using virtual environments for each project is highly recommended.
Run `pip install mattermostdriver` to install the library.
Upgrade to `mattermostdriver>=7.3.2` to resolve known login issues. If upgrading is not possible, review your Mattermost server's authentication settings and driver configuration carefully.
Ensure `driver.init_websocket()` and `driver.login()` are successful before attempting WebSocket operations. Check network connectivity and Mattermost server WebSocket settings. Upgrade to `mattermostdriver>=7.3.1` for disconnect fixes.
Verify that the `url`, `port`, and `scheme` in your `Driver` configuration are correct and reachable. If using `https`, ensure `verify` is set correctly for your server's SSL certificate, or temporarily set `verify: False` for testing (not recommended for production).