Skip to main content

A tool to send notifications to Mattermost

Project description

mattermost-notify

Send notifications using a Bot account from your applications to Mattermost. Simple, fast, easy to set up. No fuzz, just works...

Made with Python code style - black Read the Docs Mattermost Mattermost-API

Installation

First make sure to set up a Bot account on your Mattermost Server with the name notify. Follow the Documentation to learn how.

If you have your notifyBot account set up correctly and you have got it's access token you can install the client package using:

# (yep it's in reverse since another project already used the name on PyPi 😅)
pip install notify-mattermost

Then set up the connection using:

# follow the dialog...
mattermost-notify setup

Now you can test your connection by sending a dummy message to your own user account by doing:

mattermost-notify send "my first message" --user your-username

If you set up everything correctly you should have received a message at this point!

Quick Example from Python

The Python API is very straightforward to use. A quick example (after having set up everything at installation) would look like this:

import mattermost_notify as notify

# initialze the connection
notify.wakeup()

# send a message to a channel
notify.notify("This is a test message", channel_name="some_channel")

# you can also upload files in this way
notify.notify("My latest log file", user="your_username", files=["my_pipeline/log.txt"])

Project details


Download files

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

Source Distributions

No source distribution files available for this release.See tutorial on generating distribution archives.

Built Distribution

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

notify_mattermost-0.1.0-py3-none-any.whl (7.9 kB view details)

Uploaded Python 3

File details

Details for the file notify_mattermost-0.1.0-py3-none-any.whl.

File metadata

File hashes

Hashes for notify_mattermost-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 a4906d11dcbbf3b4e341b74f3fde2e5d0bc3433b4978c5383ebc8e7977a482ca
MD5 de602d16fea12a57a1959c710f23c071
BLAKE2b-256 d0fcc81e31f29e63d49a322743bfb3a5b20b2550efbfda6f01fa68faacf56495

See more details on using hashes here.

Supported by

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