Skip to main content

Default template for PDM package

Project description

ClutchTimeAlerts - NBA Clutch Time Alert Service

Ruff

A service that tracks ongoing NBA games and sends alerts when games enter "clutch time"—the last five minutes of the fourth quarter or overtime when the point difference is five points or fewer. The serivce monitors live game data and sends notifications via configured messaging platforms (such as GroupMe, Slack, etc.) to keep you informed of the most intense moments.

Features

  • Real-Time Clutch Detection: Monitors live NBA game data and detects when games enter clutch time.
  • Customizable Alerts: Configure the service to send alerts on various platforms (GroupMe, Slack, etc.).
  • Multiple Game Support: Tracks multiple NBA games simultaneously to ensure you don't miss any clutch moments.

Supported Notification Types

We currently support the following notification types out of the box:

  • GroupMe
  • Slack
  • Twilio (SMS)

On our road map we want to expand the supported notification types. If there's a type you want to see supported add an issue or submit a PR for review.

Installation

There are two different supported installation types: Python and Docker.

Python

To install the python package, first clone the repository then use pip to install it.

git clone git@github.com:bwalheim1205/clutchtimealerts.git
cd clutchtimealerts
pip install clutchtimealerts

To install via docker, first clone the repository then build using the Dockerfile.

Docker

git clone git@github.com:bwalheim1205/clutchtimealerts.git
docker build clutchtimealerts/ -t clutchtimealerts

Usage

Configuration File

The alert system utilizes a yaml configuration file. YAML contains configuration options for SQLite database and alert method configurations. Here is an example of a configuration file

Example Configuration

db_file_path: clutchtime.db
db_table_name: clutchgames
notifications:
  - type: GroupMe
    config:
      bot_id: "<group-bot-id>"
  - type: Slack
    config:
      channel: "#general"
      token: "<slack-api-token>"
- type: Twilio
    config:
      account_sid: "<twilio-accout-sid>"
      auth_token: "<twilio-auth-token>"
      from: "+14155551212"
      to: 
        - "+14155551212"
        - "+14155551212"

YAML Fields

db_file_path (Optional): Path to sqllite database to store game data. Defaults to clutchtime.db

db_table_name (Optional): SQLite table name to store data in. Default to clutchgames

notifications: List of notification configs

  • type: class name or common name of the alert type
  • config: kwargs** for the alert classes

Running Alert Service

Once you've generated a configuration file you can run alert service using one of the following commands

Python

python3 -m clutchtimealerts -f <path-to-config>

Docker

docker run -v <path-to-config>:/app/config.yml clutchtimealerts

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

clutchtimealerts-0.1.1.tar.gz (14.6 kB view details)

Uploaded Source

Built Distribution

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

clutchtimealerts-0.1.1-py3-none-any.whl (13.4 kB view details)

Uploaded Python 3

File details

Details for the file clutchtimealerts-0.1.1.tar.gz.

File metadata

  • Download URL: clutchtimealerts-0.1.1.tar.gz
  • Upload date:
  • Size: 14.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: pdm/2.21.0 CPython/3.12.7 Linux/6.8.0-1017-azure

File hashes

Hashes for clutchtimealerts-0.1.1.tar.gz
Algorithm Hash digest
SHA256 8fc5c1a4bbde887b89fed6ad3b938105d5c2a6183d13a3823c642379528d25e1
MD5 7e7f37538fe82e5f86b27d482b0687fe
BLAKE2b-256 7d7d3dcbfb365529930b49f7c452503e55fca10a48ad2a772d15e5011ca9047d

See more details on using hashes here.

File details

Details for the file clutchtimealerts-0.1.1-py3-none-any.whl.

File metadata

  • Download URL: clutchtimealerts-0.1.1-py3-none-any.whl
  • Upload date:
  • Size: 13.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: pdm/2.21.0 CPython/3.12.7 Linux/6.8.0-1017-azure

File hashes

Hashes for clutchtimealerts-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 935cb06dfbf97b33e4e58349225564dfc7605372a03d931c02d49b175d4e36b4
MD5 484b470a3493c61caf00b2a7fedf377d
BLAKE2b-256 ba0534c089aa077d51ca4a12aceb12db598c648a51f4b33498012d5aa46f351b

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