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",
    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.0.tar.gz (4.5 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.0-py3-none-any.whl (4.8 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: pipeline_tracker_sdk-0.1.0.tar.gz
  • Upload date:
  • Size: 4.5 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.0.tar.gz
Algorithm Hash digest
SHA256 d35cf514b42c83c0673f1034867af32d059ad68d5ff026d05674fd390940144d
MD5 f85a7a4e744a707119606e4425df1d80
BLAKE2b-256 817a5aeb0bcf239ec7c696817653ba8d53008471f655370913f736a36eef73b7

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for pipeline_tracker_sdk-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 05c2219cb9ecb50e7153e9eda3e4f4add5deef0319e493180d06be9d3283a27c
MD5 c15510f9e0d7d6e237ea55ca3da7a022
BLAKE2b-256 893fc2cb0097042073fc8fdf03e1f1dd30b7a0adb12b75198172eea645cff232

See more details on using hashes here.

Release history Release notifications | RSS feed

0.1.2

2 files

0.1.1

2 files

This release

0.1.0 This release

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