slackup
Slackup is a simple CLI Slack client. It supports reading config from a config file, from environment variables and from parameters passed directly to the script.
Slackup will read from file if one is passed with -f. If both “message” and file is specified, file input takes precedence. Use -f - to read from STDIN.
Installation
pip install -U pyslackup
Config
~/.slackup.cfg or /etc/slackup.cfg will be read if they exist. ~/.slackup.cfg takes precedence if it is found.
slack_token: 'xoxp-YOUR-TOKEN-HERE' slack_channel: '#slackup' slack_username: 'slackup' slack_emoji: ':robot_face:'
Config can also be specified via environment variables. These will override config file entries if present:
SLACK_TOKEN SLACK_CHANNEL SLACK_USERNAME SLACK_EMOJI SLACK_MESSAGE
Usage
usage: slackops [-h] [-v] [-c CHANNEL] [-t TOKEN] [-u USERNAME] [-s] [-f FILE] [message]
positional arguments:
message message to post to slack
optional arguments:
-h, --help show this help message and exit
-v, --verbose increase output verbosity
-c CHANNEL, --channel CHANNEL
specify channel to post to
-t TOKEN, --token TOKEN
set token to use
-u USERNAME, --username USERNAME
set Slack username to post as
-s, --snippet Post message as attachment/snippet
-f FILE, --file FILE read message from file or stdin
Examples
# Command line usage example
echo 'HELLO' | slackops -c 'someotherchannel' -f -
slackops "greetings fellow kids"
slackops -s -f inputfile.txt
# ...or used as a python module
from slackup import SlackUp
s = SlackUp()
s.post("ehlo world")
Metadata
Release files for pyslackup 0.7.8
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| pyslackup-0.7.8.tar.gz | 3.6 kB | Without provenance | Details for pyslackup-0.7.8.tar.gz |
Release files / pyslackup-0.7.8.tar.gz
| Download URL | pyslackup-0.7.8.tar.gz |
|---|---|
| Size | 3.6 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
5f8bb578d4d302dc906f507507b642c682823c8d3a441f0d724e21607961a55d
|
|
BLAKE2b-256 checksum How to use checksums |
d88fa706268e01c9aa5ac2ad313372eb4bde5416ee3303f600441acae38a709e
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
Security for pyslackup 0.7.8
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.