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
Release files for triggerkit 0.0.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| triggerkit-0.0.1.tar.gz | 19.9 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| triggerkit-0.0.1-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 40.7 kB
Release files / triggerkit-0.0.1.tar.gz
| Download URL | triggerkit-0.0.1.tar.gz |
|---|---|
| Size | 19.9 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
4fe9ef3a2ea1bbbf07e99fdc4f25993fa145cc550e7336402fb2a5721638ff13
|
|
BLAKE2b-256 checksum How to use checksums |
d8e5cb00b01503fe9090b12c99cbe0380db2086008522cc202fa9a3cbaa95617
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.13.5
|
Release files / triggerkit-0.0.1-py3-none-any.whl
| Download URL | triggerkit-0.0.1-py3-none-any.whl |
|---|---|
| Size | 20.8 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
424f161afca6f0542d8143f5716e449dbead09e8f0f2ce63954323d988bec254
|
|
BLAKE2b-256 checksum How to use checksums |
dc80554d4f7511a8044746122c779fa64f73cbcc63661bc0d74862ce4fdd7d76
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.13.5
|