slackistics
Package to send Statistics over a Slack Incoming Webhook
Free software: MIT license
Features
Send messages via Slack Incoming Webhook
Provides object-based templates for Messages, Attachments and Fields
Fine-grained control over Message formatting, and supports mrkdwn
- Easily generate various charts based on your data. Supported types are:
Bar Chart
Line Chart
Radar Chart
Pie Chart
Outer Pie Chart
Donut Chart
Radial Gauge
Roadmap
Implement tests
Add extensive documentation
Add support for more chart types
Add templates for most commonly sent messages
Extend customisation to override webhook settings
Credits
Inspiration for this package occurred while trying to send statistics for projects in a uniform way to Slack channels for Label A.
This package was created with Cookiecutter and the audreyr/cookiecutter-pypackage project template.
This package makes use of the Quickchart.io to draw diagrams.
Usage
from slacktastic.client import SlackClient
from slacktastic.template import Attachment, PieChart, Message
client = SlackClient(webhook_url='YOUR WEBHOOK URL')
attachment = Attachment(
title='Cool block title',
title_link='https://labela.nl',
text='Some awesome text')
chart = PieChart(
title="Test data",
labels=['Ride', 'Reservation'],
values=[22, 55]
)
# You can now pass custom ChartJS options for all diagrams! See ChartJS docs
chart.set_options({
title: {
display: true,
text: 'Cool title',
fontColor: 'hotpink', # For testing purposes only...
fontSize: 32,
})
another_chart = BarChart(
"Test data", labels=['Jan', 'Feb', 'Mar', 'Apr', 'May'],
data={
'Test 1': [1, 2, 4, 8, 16],
'Test 2': [7, 3, 45, 1, 12],
}
)
# Customise the background colors of your data if you don't like our scheme
another_chart.set_background_colors([
"#000", "#3333", "#666", "#999", "#CCC"
])
message = Message(
text="I want to show you some *magic* :sparkles:",
attachments=[attachment, chart]
)
client.send_message(message)
History
0.3.2 (2019-08-01)
Added RadialGauge diagram
0.3.1 (2019-08-01)
Added OuterPieChart, the Pie chart with labels on the outside!
0.3.0 (2019-07-31)
Reworked class inheritance to limit amount of parameters passed around
Changed default background colors for all graphs
Added possibility supply own background colors for all graph types
Changed default label text on FoodChart diagrams such as Pie and Donut to make it more readable
Added possibility to override options of diagrams for fine grained control. Does not impose any restrictions currently!
0.2.3 (2019-07-31)
Updated documentation: added roadmap and features
0.2.2 (2019-07-30)
Removed invalid documentation link
0.2.1 (2019-07-30)
Added support for Donut, Bar, Line and Radar charts
Updated documentation
0.1.0 (2019-07-25)
First release on PyPI.
Metadata
Release files for slacktastic 0.3.2
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 |
|---|---|---|---|---|
| slacktastic-0.3.2.tar.gz | 7.3 kB | Without provenance | Details for slacktastic-0.3.2.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| slacktastic-0.3.2-py2.py3-none-any.whl | Python 3, Python 2 | none | any | Details for slacktastic-0.3.2-py2.py3-none-any.whl |
Total release size: 15.5 kB
Release files / slacktastic-0.3.2.tar.gz
| Download URL | slacktastic-0.3.2.tar.gz |
|---|---|
| Size | 7.3 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
9228f4ed15faa9550966541d395bcb3dd99006c3d06252a718be1025d61c63e5
|
|
BLAKE2b-256 checksum How to use checksums |
1589678d78be097d5368e39c764d9e2b2f300169d326dc6e2ded3653c2f364d6
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/1.13.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/39.0.1 requests-toolbelt/0.9.1 tqdm/4.32.2 CPython/3.7.0
|
Release files / slacktastic-0.3.2-py2.py3-none-any.whl
| Download URL | slacktastic-0.3.2-py2.py3-none-any.whl |
|---|---|
| Size | 8.2 kB |
| Tags | Python 2 Python 3 |
|
SHA-256 checksum How to use checksums |
f7a2d86ddf80f74d2c23945aaac20cf791b19b3fb72df29c4c5e1cb080360e53
|
|
BLAKE2b-256 checksum How to use checksums |
d7bb42a3b04e50028734d5fc6420115c98af7e95b9943d504cccb91ce8c1a7f5
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/1.13.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/39.0.1 requests-toolbelt/0.9.1 tqdm/4.32.2 CPython/3.7.0
|
Security for slacktastic 0.3.2
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.