Skip to main content

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.

Metadata

Release files for patter 0.2.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for patter 0.2.1
File Size Uploaded
patter-0.2.1.tar.gz 4.4 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for patter 0.2.1
File Interpreter ABI Platform
patter-0.2.1-py3-none-any.whl Python 3 none any Details

Total release size: 9.5 kB

Release files / patter-0.2.1.tar.gz

Download URL patter-0.2.1.tar.gz
Size 4.4 kB
Tags Source
SHA-256 checksum
How to use checksums
c1a9063c5c426362bb521a6f2b7bb272a19e6b6a67b97dacaa0151f14df30e8a
BLAKE2b-256 checksum
How to use checksums
46ced603017b7aeb0b1f64b7b1aa786430806a99bf6e8b9cbcd1960acb9025a0
Upload date
Uploaded using Trusted Publishing?
What is 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

Release files / patter-0.2.1-py3-none-any.whl

Download URL patter-0.2.1-py3-none-any.whl
Size 5.1 kB
Tags Python 3
SHA-256 checksum
How to use checksums
98e50bfcd8aca489c5d54aa9a5e88912cb2b986f9f85b7c72c06cd55de278ec5
BLAKE2b-256 checksum
How to use checksums
ea4d5c38231a817c461519e1991e83078259462e3671444d16187aec0ff18455
Upload date
Uploaded using Trusted Publishing?
What is 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

Release history Release notifications | RSS feed

This release

0.2.1 This release

2 release files

0.1.0

3 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page