Skip to main content
Python Software Foundation 20th Year Anniversary Fundraiser  Donate today!

Pipe stdout directly to Mattermost channels or users.

Project description

patter

Pipe stdout directly to Mattermost.

patter demo

Install

$ pip install patter

Then set the following environment variables based on your Mattermost server's config:

MATTERMOST_TEAM_NAME
MATTERMOST_URL
MATTERMOST_USERNAME
MATTERMOST_PASSWORD
MATTERMOST_PORT

Usage

Send a message to a user.

echo "testing" | patter -u some_user

Send a message to a channel.

echo "testing" | patter -c town-square

Send a file.

patter -c town-square -f some_file.txt

Todo

  • <input type="checkbox" disabled="" /> add unit tests via pytest
  • <input type="checkbox" disabled="" /> allow message/files that are not UTF-8 to be sent
  • <input type="checkbox" disabled="" /> add option of reading from a .patter file instead of using env vars.
  • <input type="checkbox" disabled="" /> remove prints and add logging via verbose flag

Contribute

PRs accepted.

License

MIT © Christopher Hranj

Notice: This project was developed in part during my 10% time at Truveris, Inc.

Project details


Download files

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

Files for patter, version 0.2.1
Filename, size File type Python version Upload date Hashes
Filename, size patter-0.2.1-py3-none-any.whl (5.1 kB) File type Wheel Python version py3 Upload date Hashes View
Filename, size patter-0.2.1.tar.gz (4.4 kB) File type Source Python version None Upload date Hashes View

Supported by

AWS AWS Cloud computing Datadog Datadog Monitoring DigiCert DigiCert EV certificate Facebook / Instagram Facebook / Instagram PSF Sponsor Fastly Fastly CDN Google Google Object Storage and Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Salesforce Salesforce PSF Sponsor Sentry Sentry Error logging StatusPage StatusPage Status page