Tool to send messages via Slack
Project description
ppslack
Tool to send messages via Slack
PyPI package: ppslack
If you spot a problem or have an improvement idea then feel free to open a GitHub issue. I will be happy to look into it for you.
Installation
The package is available in PyPI and can be installed using pip:
$ pip install --user ppslack
$ ppslack --help
Once installed, a command line tool ppslack will be available in your system's PATH.
Configuration
By default, the tool reads its configuration from ~/.config/ppslack file (the
location can be overridden by setting environment variable XDG_CONFIG_HOME).
The config file should look like this:
[default]
slack_key=xxx
email_domain=example.com
Usage - Help
$ ppslack --help
usage: ppslack [--version] [--help] [--debug] [--verbose] [-f SENDER] -t RECIPIENTS [RECIPIENTS ...] [-s SUBJECT] [-S] [-H]
Tool to send messages via Slack
optional arguments:
--version show program's version number and exit
--help show this help message and exit
--debug debugging mode
--verbose verbose debugging mode
-f SENDER, --from SENDER
sender
-t RECIPIENTS [RECIPIENTS ...], --to RECIPIENTS [RECIPIENTS ...]
recipient
-s SUBJECT, --subject SUBJECT
subject
-S, --slack Slack message (keeping for backward compatibility)
-H, --code send code block
Usage - CLI
$ echo 'The king is dead, long live the king!' \
| ppslack -Hf 'Jon Snow' \
-t 'arya.stark@winterfell.com' \
-s 'Re: secret message'
Usage - Python module
from ppslack import Slack
slack = Slack()
status = slack.send(
sender='Jon Snow',
recipients=['arya.stark@winterfell.com'],
subject='Re: secret message',
message='The king is dead, long live the king!',
code=True
)
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file ppslack-3.2.4.tar.gz.
File metadata
- Download URL: ppslack-3.2.4.tar.gz
- Upload date:
- Size: 16.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/4.0.2 CPython/3.11.4
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
ce4cf5f8036337eba4223cf256673e7ab7e92099eea5bf70efe2b8cc70b1f8e1
|
|
| MD5 |
ddfc7edd0387ffe425cda331cddd6f3e
|
|
| BLAKE2b-256 |
53703fdf41e5a4d1e8ef754d01fb50de5d7fa702c2c7b6beb7ed2e0f74392e6e
|
File details
Details for the file ppslack-3.2.4-py3-none-any.whl.
File metadata
- Download URL: ppslack-3.2.4-py3-none-any.whl
- Upload date:
- Size: 17.5 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/4.0.2 CPython/3.11.4
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
5fa98a91ddbbe75f7a9e284860830eda87a86952455c2a9315a6d4c04e495825
|
|
| MD5 |
19502e414b68a8465217ef03aa7f7e92
|
|
| BLAKE2b-256 |
b082233a430ef7a7560a43c29b11d96f0a943cb296b13bb6b0c4173ceedbb7ed
|