Skip to main content
Pre-release

This release is a pre-release and may not be stable for production use.

elizaos-plugin-mattermost (Python)

Python implementation of the Mattermost plugin for elizaOS.

Installation

pip install elizaos-plugin-mattermost

Quick Start

import asyncio
from elizaos_plugin_mattermost import MattermostConfig, MattermostService, MattermostContent

async def main():
    # Create config from environment variables
    config = MattermostConfig.from_env()
    
    # Or create config manually
    config = MattermostConfig(
        server_url="https://chat.example.com",
        bot_token="your-bot-token",
    )
    
    # Create and start service
    service = MattermostService(config)
    await service.start()
    
    # Register message handler
    def on_message(payload):
        print(f"Received message: {payload.post.message}")
    
    service.on_message(on_message)
    
    # Send a message
    content = MattermostContent(text="Hello from Python!")
    await service.send_message("channel_id", content)
    
    # Keep running
    try:
        while True:
            await asyncio.sleep(1)
    except KeyboardInterrupt:
        await service.stop()

asyncio.run(main())

Development

# Install dev dependencies
pip install -e ".[dev]"

# Run tests
pytest

# Run linter
ruff check .
ruff format .

License

MIT

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

elizaos_plugin_mattermost-2.0.0a5.tar.gz (13.0 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

elizaos_plugin_mattermost-2.0.0a5-py3-none-any.whl (14.1 kB view details)

Uploaded Python 3

File details

Details for the file elizaos_plugin_mattermost-2.0.0a5.tar.gz.

File metadata

File hashes

Hashes for elizaos_plugin_mattermost-2.0.0a5.tar.gz
Algorithm Hash digest
SHA256 616b080f51a9122422fdbbe3afd6dc7ed5f77d47fb110d4b2db34775e9f0de24
MD5 401d2ee4d4aa57eaade199ed14800e0b
BLAKE2b-256 8ba97e819acbf0db74174552bc2364e3f8e4d16b5068e420f9f404d97e521089

See more details on using hashes here.

File details

Details for the file elizaos_plugin_mattermost-2.0.0a5-py3-none-any.whl.

File metadata

File hashes

Hashes for elizaos_plugin_mattermost-2.0.0a5-py3-none-any.whl
Algorithm Hash digest
SHA256 dd71dd61e8eba6265a4dbb5bddbfc89b62153a86448ee6579d79fbea310364aa
MD5 d0d20282ed1310d9d9d36f87e586982d
BLAKE2b-256 fe913effa99eba9c9c874d2f0b5043e53d425ddc3d458e83168048f1ecd36121

See more details on using hashes here.

Release history Release notifications | RSS feed

This release

2.0.0a5 This release

2 files

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page