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.1.tar.gz (4.6 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.1-py3-none-any.whl (4.9 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: pipeline_tracker_sdk-0.1.1.tar.gz
  • Upload date:
  • Size: 4.6 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.1.tar.gz
Algorithm Hash digest
SHA256 857d542e60c54019645deb21080dac62be5100c4aea045ef694b5416cb89054c
MD5 0bfada1d7478c5c1ff2f1097485a977f
BLAKE2b-256 62e0300cd55bf65cf1908cba1b5d09f7a18f08fea8216d736de8079501bded59

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for pipeline_tracker_sdk-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 9e71a6cba9337b9c1e297b74d8f66ef486243ca6bb6f6adb1ade3c74082f60b1
MD5 cc882ad8556c0fe6b3475db2d9f0dbff
BLAKE2b-256 7815e1209ece262c2471aad98e0d42c87c734ed8da6e6fb7d85f3196314c6c64

See more details on using hashes here.

Release history Release notifications | RSS feed

This release

0.1.1 This release

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