A toolbelt for working with the various Slack APIs in python.
Install
Install slacktools with PyPI
pip install slacktools
This library is tested against Python 3.4+. Open an issue if you need this library to work on an older version.
Features
Authorization utils to verify X-Slack-Signature
- Message text utils to do things like:
Format slack control sequences like <@USERIDXX> and <text|url> with proper escaping
Extract mentions and grab user ids from mentions
Properly escape message text
Message sending functions with partial application to reduce boilerplate and improve testability
Check out the docs for more info and API documentation.
Tests
Running the tests is simple enough:
python setup.py test
Or just pytest will do the trick. This will run the tests in the tests/ directory as well as as bunch of docstring tests in the src/ directory.
The Makefile also has some good test commands that will spin up a docker container:
make test will run the tests in python 3.7.
make test-all will run a series of tests from python 3.7 down to 3.4.
make test-{{PY_VERSION}} where PY_VERSION can be any tagged version of the official python docker image will run tests under that python version. Ex: make test-3.5 will run under Python 3.5.
Roadmap
Wider python support? This lib only supports python 3 right now. However, if someone needs it, I can add python 2 compatibility.
Friendly message builder API?
Build deep links into clients
In the Wild
austinpray/kizuna is a silly chatbot that uses this library.
Metadata
Release files for slacktools 0.0.5
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 | |
|---|---|---|---|---|
| slacktools-0.0.5.tar.gz | 3.1 kB | Without provenance | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| slacktools-0.0.5-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 5.7 kB
Release files / slacktools-0.0.5.tar.gz
| Download URL | slacktools-0.0.5.tar.gz |
|---|---|
| Size | 3.1 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
8c705fd16a11468b7a67607ae1cb7f96c34b841be43babe23ed313c70a70be04
|
|
BLAKE2b-256 checksum How to use checksums |
46c737300ce6cf3bc9b0eb40f62798c9ba5da76599a07fff477af713a3af0283
|
| 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/39.1.0 requests-toolbelt/0.8.0 tqdm/4.25.0 CPython/3.7.0
|
Release files / slacktools-0.0.5-py3-none-any.whl
| Download URL | slacktools-0.0.5-py3-none-any.whl |
|---|---|
| Size | 2.6 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
1586d90799df68e6d72ff17b1e05a983cd82efde96295975c923ef1e5e64ea96
|
|
BLAKE2b-256 checksum How to use checksums |
88f37d1c7350413ce2b588f3a4dff92f3b8a116e423652fff5c216452731303a
|
| 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/39.1.0 requests-toolbelt/0.8.0 tqdm/4.25.0 CPython/3.7.0
|
Security for slacktools 0.0.5
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.