Mattermost plugin for elizaOS - Python implementation for bot integration
Project description
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
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file elizaos_plugin_mattermost-2.0.0a5.tar.gz.
File metadata
- Download URL: elizaos_plugin_mattermost-2.0.0a5.tar.gz
- Upload date:
- Size: 13.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.12.10
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
616b080f51a9122422fdbbe3afd6dc7ed5f77d47fb110d4b2db34775e9f0de24
|
|
| MD5 |
401d2ee4d4aa57eaade199ed14800e0b
|
|
| BLAKE2b-256 |
8ba97e819acbf0db74174552bc2364e3f8e4d16b5068e420f9f404d97e521089
|
File details
Details for the file elizaos_plugin_mattermost-2.0.0a5-py3-none-any.whl.
File metadata
- Download URL: elizaos_plugin_mattermost-2.0.0a5-py3-none-any.whl
- Upload date:
- Size: 14.1 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.12.10
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
dd71dd61e8eba6265a4dbb5bddbfc89b62153a86448ee6579d79fbea310364aa
|
|
| MD5 |
d0d20282ed1310d9d9d36f87e586982d
|
|
| BLAKE2b-256 |
fe913effa99eba9c9c874d2f0b5043e53d425ddc3d458e83168048f1ecd36121
|