Skip to main content

Pipeline Tracker SDK

A Python SDK for monitoring and tracking data pipeline executions. Easily log pipeline starts, successes, failures, and steps with built-in status updates and logging.

Features

  • Pipeline Monitoring: Log the start, success, and failure of your runs.
  • Step Tracking: Track individual steps within a pipeline.
  • Robust Exception Logging: Automatically log errors on step failure and re-raise.
  • Clean Logging: No more print() statements; uses Python's standard logging library for clean and configurable output.

Installation

pip install pipeline-tracker-sdk

Quick Start

1. Basic Tracking

from pipeline_tracker import Tracker

# Initialize the tracker with your monitoring base URL and API key
tracker = Tracker(
    base_url="https://your-monitoring-domain.com",
    api_key="your-secure-api-key"
)

# Start a run
run_id = tracker.start(
    pipeline_name="Weather Data Pipeline",
    expected_frequency_minutes=1440,
    criticality="HIGH"
    owner_name="Data Team",
    owner_email="datateam@example.com"
)

try:
    # Your pipeline logic goes here
    # ...
    
    # Log success once done
    tracker.success(run_id, records_processed=42)
except Exception as e:
    # Log failure with the error message
    tracker.fail(run_id, error_message=str(e))
    raise e

2. Tracking Individual Steps

You can track individual steps within a run manually:

tracker.step(run_id, step_name="Fetch API Data", status="SUCCESS", message="Fetched 100 rows.")

Or you can use the run_step helper function, which handles step success and failure automatically:

from pipeline_tracker import run_step

def fetch_data(url):
    # Some work
    return "data"

# This will call fetch_data and automatically log success or failure for "Fetch API Data" step.
data = run_step(tracker, run_id, "Fetch API Data", fetch_data, "https://api.example.com")

Configuring Logging

The SDK uses Python's standard logging library under the logger name pipeline_tracker. You can configure logging in your application to control the verbosity and destination of logs:

import logging

logging.basicConfig(level=logging.WARNING)
# Now SDK warnings (e.g. API connection issues) will be printed according to your config.

License

This project is licensed under the MIT License - see the LICENSE file for details.

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

pipeline_tracker_sdk-0.1.2.tar.gz (4.7 kB view details)

Uploaded Source

Built Distribution

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

pipeline_tracker_sdk-0.1.2-py3-none-any.whl (4.9 kB view details)

Uploaded Python 3

File details

Details for the file pipeline_tracker_sdk-0.1.2.tar.gz.

File metadata

  • Download URL: pipeline_tracker_sdk-0.1.2.tar.gz
  • Upload date:
  • Size: 4.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/7.0.0 CPython/3.14.6

File hashes

Hashes for pipeline_tracker_sdk-0.1.2.tar.gz
Algorithm Hash digest
SHA256 f0e089b0195860e61c473d715c3af1596c73d38bb80071a5692afad8c76f57af
MD5 5578b62ce3f2f68c6ace5648224e0c52
BLAKE2b-256 e291a4c7a26a3b0665295c7e893fffe9b8697bb2940eb6128d3859389e0ba525

See more details on using hashes here.

File details

Details for the file pipeline_tracker_sdk-0.1.2-py3-none-any.whl.

File metadata

File hashes

Hashes for pipeline_tracker_sdk-0.1.2-py3-none-any.whl
Algorithm Hash digest
SHA256 383da06368a82fb952a0b2dea39cfce01cb0e2c2d613aed89cc4f2ed92d3c2ea
MD5 2095c4ba1d1eb84253b9fd919c2c9da0
BLAKE2b-256 4e1b32c8beb87ccd85bbded49b605b4001c5656275dc23eac560776327f6dbfa

See more details on using hashes here.

Release history Release notifications | RSS feed

This release

0.1.2 This release

2 files

0.1.1

2 files

0.1.0

2 files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page