Skip to main content

A Python package for displaying progress bars in Slack messages.

Project description

slack-progress-bar Downloads

A Python library for adding a progress bar to a Slack Bot, updated for Python 3.9+.

animated-gif

Installation

pip install slack-progress-bar

Tutorial

  1. Setup your bot using the Slack API and grab the associated Bot User OAuth Token (Settings -> Install App).
  2. Get the user_id for the person you want to receive updates. This can be found by going to a Slack profile and clicking Copy member ID.
import time
from slack_progress_bar import SlackProgressBar

progress_bar = SlackProgressBar(token=BOT_TOKEN, user_id=SLACK_MEMBER_ID, total=150)
for i in range(151):
   time.sleep(0.1)
   progress_bar.update(i)

Instantiating a SlackProgressBar will send a message featuring an empty progress bar. from the bot account to your Slack user. The message will be sent from your Bot account to your Slack user in a private message. Calling update() will update that progress bar on Slack. To create a new progress bar on Slack, instantiate a new instance of SlackProgressBar.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

slack_progress_bar-2.0.0.tar.gz (3.7 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

slack_progress_bar-2.0.0-py3-none-any.whl (4.3 kB view details)

Uploaded Python 3

File details

Details for the file slack_progress_bar-2.0.0.tar.gz.

File metadata

  • Download URL: slack_progress_bar-2.0.0.tar.gz
  • Upload date:
  • Size: 3.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.0.0 CPython/3.9.6

File hashes

Hashes for slack_progress_bar-2.0.0.tar.gz
Algorithm Hash digest
SHA256 96befca9b80740b2ad7e082c68015a37e1fee6e7dc7ac91e2a2e97c1cb018b7c
MD5 67b9b1360c8259829ffae0337c361523
BLAKE2b-256 e5d2eb526639093d70377179d0a060a81c5004f2d4e33360cadb93bdc14d82a0

See more details on using hashes here.

File details

Details for the file slack_progress_bar-2.0.0-py3-none-any.whl.

File metadata

File hashes

Hashes for slack_progress_bar-2.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 2642f60c9a661ea24b1d0881f8538197f27f1326163b4faa2d1e64a2ed209700
MD5 2c2f92bd6fb8981ac5c9afafa3ed9c74
BLAKE2b-256 5b4c7326048b3f6f55f85638846adb81db22113f92b1359d92160956c9b09230

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page