Skip to main content

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

  • add unit tests via pytest
  • allow message/files that are not UTF-8 to be sent
  • add option of reading from a .patter file instead of using env vars.
  • 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.

Source Distribution

patter-0.2.1.tar.gz (4.4 kB view details)

Uploaded Source

Built Distribution

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

patter-0.2.1-py3-none-any.whl (5.1 kB view details)

Uploaded Python 3

File details

Details for the file patter-0.2.1.tar.gz.

File metadata

  • Download URL: patter-0.2.1.tar.gz
  • Upload date:
  • Size: 4.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.11.0 pkginfo/1.4.2 requests/2.19.1 setuptools/40.0.0 requests-toolbelt/0.8.0 tqdm/4.23.4 CPython/3.7.0

File hashes

Hashes for patter-0.2.1.tar.gz
Algorithm Hash digest
SHA256 c1a9063c5c426362bb521a6f2b7bb272a19e6b6a67b97dacaa0151f14df30e8a
MD5 ba04011d537f76f59903eb79277794ed
BLAKE2b-256 46ced603017b7aeb0b1f64b7b1aa786430806a99bf6e8b9cbcd1960acb9025a0

See more details on using hashes here.

File details

Details for the file patter-0.2.1-py3-none-any.whl.

File metadata

  • Download URL: patter-0.2.1-py3-none-any.whl
  • Upload date:
  • Size: 5.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.11.0 pkginfo/1.4.2 requests/2.19.1 setuptools/40.0.0 requests-toolbelt/0.8.0 tqdm/4.23.4 CPython/3.7.0

File hashes

Hashes for patter-0.2.1-py3-none-any.whl
Algorithm Hash digest
SHA256 98e50bfcd8aca489c5d54aa9a5e88912cb2b986f9f85b7c72c06cd55de278ec5
MD5 844cf2b9c74641a637978f08ca50343e
BLAKE2b-256 ea4d5c38231a817c461519e1991e83078259462e3671444d16187aec0ff18455

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