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
Metadata
Release files for elizaos-plugin-mattermost 2.0.0a5
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| elizaos_plugin_mattermost-2.0.0a5.tar.gz | 13.0 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| elizaos_plugin_mattermost-2.0.0a5-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 27.1 kB
Release files / elizaos_plugin_mattermost-2.0.0a5.tar.gz
| Download URL | elizaos_plugin_mattermost-2.0.0a5.tar.gz |
|---|---|
| Size | 13.0 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
616b080f51a9122422fdbbe3afd6dc7ed5f77d47fb110d4b2db34775e9f0de24
|
|
BLAKE2b-256 checksum How to use checksums |
8ba97e819acbf0db74174552bc2364e3f8e4d16b5068e420f9f404d97e521089
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.12.10
|
Release files / elizaos_plugin_mattermost-2.0.0a5-py3-none-any.whl
| Download URL | elizaos_plugin_mattermost-2.0.0a5-py3-none-any.whl |
|---|---|
| Size | 14.1 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
dd71dd61e8eba6265a4dbb5bddbfc89b62153a86448ee6579d79fbea310364aa
|
|
BLAKE2b-256 checksum How to use checksums |
fe913effa99eba9c9c874d2f0b5043e53d425ddc3d458e83168048f1ecd36121
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.12.10
|