Default template for PDM package
Project description
ClutchTimeAlerts - NBA Clutch Time Alert Service
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
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file clutchtimealerts-0.1.2.tar.gz.
File metadata
- Download URL: clutchtimealerts-0.1.2.tar.gz
- Upload date:
- Size: 14.5 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
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
8e83da2c86761ea2a8d523e9a842fc1fdb3af30af52ae8bed4c21e79463109a4
|
|
| MD5 |
72dc494fe2de9bd1bac002aef905b582
|
|
| BLAKE2b-256 |
f41710725e649e0ef26b9c0567886fd30ed9d8075b831c1b7105709edc95aaca
|
File details
Details for the file clutchtimealerts-0.1.2-py3-none-any.whl.
File metadata
- Download URL: clutchtimealerts-0.1.2-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
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
381b4ca2b436a2cbc67f2ea6f467010c1e9a15a4c36b3a812dc2111df81325b3
|
|
| MD5 |
3f5f38ba3bca64d4dec0e8887bcfc28a
|
|
| BLAKE2b-256 |
be4ed35f8df967fa0b2938ec98e7eb7330f6501e3d446637897bade8f30c27de
|