Modular kit for trigger-based actions
Project description
TriggerKit
Overview
This system allows you to:
- Define Snowflake views to monitor
- Schedule when to check these views for new data
- Configure actions to trigger when data is available
- Extend with custom actions for your specific needs
Installation
Install latest from the GitHub repository:
$ pip install git+https://github.com/Datatistics/triggerkit.git
or from pypi
$ pip install triggerkit
Usage
Run the system with your configuration file:
# Using default config.toml in current directory
snowflake-actions
# Or specify a config file
snowflake-actions --config /path/to/your/config.toml
# To check your configuration file syntax
snowflake-actions --check-config
# To list available actions
snowflake-actions --list-actions
# For verbose logging
snowflake-actions --verbose
Creating Custom Actions
You can extend the system with your own custom actions:
import triggerkit as tk
@tk.register("my_custom_action", "Description of what this action does")
def my_custom_action(data: List[Dict]):
"""
Takes in records from Snowflake view and processes them how you want.
Args:
data: List of records from Snowflake
Returns:
Dictionary with action results
"""
# Your custom logic here
return {"processed": len(data)}
Environment Variables
CONFIG_PATH: Path to the TOML configuration fileSNOWFLAKE_PASSWORD: Snowflake password (recommended over storing in config)LOG_LEVEL: Set the logging level (DEBUG, INFO, WARNING, ERROR)
Built-in Actions
The system comes with several built-in actions:
send_alert: Sends email and Slack notificationslog_incident: Records incidents in a tracking systemgenerate_report: Creates summary reports from data
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
triggerkit-0.0.1.tar.gz
(19.9 kB
view details)
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 triggerkit-0.0.1.tar.gz.
File metadata
- Download URL: triggerkit-0.0.1.tar.gz
- Upload date:
- Size: 19.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.13.5
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
4fe9ef3a2ea1bbbf07e99fdc4f25993fa145cc550e7336402fb2a5721638ff13
|
|
| MD5 |
6f7d96aba87a9846808a4528d024bd90
|
|
| BLAKE2b-256 |
d8e5cb00b01503fe9090b12c99cbe0380db2086008522cc202fa9a3cbaa95617
|
File details
Details for the file triggerkit-0.0.1-py3-none-any.whl.
File metadata
- Download URL: triggerkit-0.0.1-py3-none-any.whl
- Upload date:
- Size: 20.8 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.13.5
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
424f161afca6f0542d8143f5716e449dbead09e8f0f2ce63954323d988bec254
|
|
| MD5 |
ecf54c22ba61d9ccea78170f1d775e5d
|
|
| BLAKE2b-256 |
dc80554d4f7511a8044746122c779fa64f73cbcc63661bc0d74862ce4fdd7d76
|