Tool to send Slack messages
Project description
ppslack
Tool to send Slack messages
PyPI package: ppslack
Feel free to open a GitHub issue if you spot a problem or have an improvement idea. 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] [-H]
Tool to send Slack messages
options:
--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
-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
File details
Details for the file ppslack-4.0.1.tar.gz
.
File metadata
- Download URL: ppslack-4.0.1.tar.gz
- Upload date:
- Size: 16.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/5.1.1 CPython/3.12.7
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 9ac31109409cb29928aea7899190c326b7ab6dc1b03f9098028e5d1db0b45e31 |
|
MD5 | 2f3834e5088ffe9b3f18673a4206e3f1 |
|
BLAKE2b-256 | 12d3fd62cef4d4e266b20fdc6285581e0f6f14223847e40c6f7388ed07d6d838 |
Provenance
The following attestation bundles were made for ppslack-4.0.1.tar.gz
:
Publisher:
main.yml
on peterpakos/ppslack
-
Statement type:
https://in-toto.io/Statement/v1
- Predicate type:
https://docs.pypi.org/attestations/publish/v1
- Subject name:
ppslack-4.0.1.tar.gz
- Subject digest:
9ac31109409cb29928aea7899190c326b7ab6dc1b03f9098028e5d1db0b45e31
- Sigstore transparency entry: 147438872
- Sigstore integration time:
- Predicate type:
File details
Details for the file ppslack-4.0.1-py3-none-any.whl
.
File metadata
- Download URL: ppslack-4.0.1-py3-none-any.whl
- Upload date:
- Size: 17.4 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/5.1.1 CPython/3.12.7
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 2fac408e64ed00588f2ec9e9f2d09cb37c855a7313b614fb72e7c6aad41d1f16 |
|
MD5 | 1554daa16398c759b61e0359632ae1e3 |
|
BLAKE2b-256 | 814bc2c6c95bab97bfce8ea5bf21b83985d03af469e4359e337a37277f3e59ed |
Provenance
The following attestation bundles were made for ppslack-4.0.1-py3-none-any.whl
:
Publisher:
main.yml
on peterpakos/ppslack
-
Statement type:
https://in-toto.io/Statement/v1
- Predicate type:
https://docs.pypi.org/attestations/publish/v1
- Subject name:
ppslack-4.0.1-py3-none-any.whl
- Subject digest:
2fac408e64ed00588f2ec9e9f2d09cb37c855a7313b614fb72e7c6aad41d1f16
- Sigstore transparency entry: 147438873
- Sigstore integration time:
- Predicate type: