Skip to main content

A Python package for displaying progress bars in Slack messages.

Project description

slack-progress-bar

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

Installation

pip install slack-progress-bar

Tutorial

  1. Setup your bot using the Slack API and grab the associate bot token.
  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
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 to your Slack user featuring your empty progress bar. Calling update() will update that progress bar on Slack. To create a new progress bar, 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-1.1.0.tar.gz (3.2 kB view hashes)

Uploaded Source

Built Distribution

slack_progress_bar-1.1.0-py3-none-any.whl (3.8 kB view hashes)

Uploaded Python 3

Supported by

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