Skip to main content

Handit.AI Python SDK Documentation

AI model deployment and management often fall short of delivering the expected business outcomes, with up to 80% of AI projects never scaling beyond pilot stages. To address this challenge, Handit.AI provides a comprehensive AI Lifecycle Management Platform that ensures AI models are continuously aligned with business goals and KPIs.

The Handit.AI Python SDK is designed to streamline the process of monitoring, tracking, and optimizing AI models in production. With features for automated and manual data capture, seamless integration, and real-time performance insights, this SDK empowers businesses to maintain the effectiveness and reliability of their AI models.


What Handit.AI Python SDK Offers

  1. Continuous Monitoring of AI Models
    Detect performance degradation and data drift in real-time, ensuring your models remain accurate and reliable.

  2. Automated Data Capture
    Automatically track model inputs and outputs for HTTP requests using tools like requests, streamlining the tracking process without requiring manual intervention.

  3. Business KPI Alignment
    Capture and monitor AI model inputs and outputs to align model performance with your business’s strategic objectives.

  4. Seamless Integration
    Easily integrate into your existing Python-based AI workflows, including popular frameworks like PyTorch, TensorFlow, and Scikit-learn.

  5. Custom AI Model Tracking
    Manually track specific model events to ensure critical data is never missed, providing a holistic view of AI model performance.


Why Use Handit.AI Python SDK?

Handit.AI Python SDK addresses the critical issues AI projects face, such as the disconnect between model performance and business goals, performance degradation, and lack of continuous optimization. By integrating our tracking tools, your AI models become transparent, measurable, and continuously optimized, helping you achieve long-term success.

Key Benefits:

  • Improved AI ROI
    Directly connect model performance to business outcomes, ensuring that your AI initiatives deliver the value they promise.

  • Proactive Issue Prevention
    Identify performance issues and data drift early, allowing for rapid optimization.

  • Reduced Time to Market
    Automate much of the manual work required to monitor and optimize AI models, accelerating the deployment process.


Installation

Install the SDK from PyPI:

pip install handit-sdk

Getting Started

1. Configure the SDK

Set up the SDK with your API key and tracking server URL (optional):

from handit_tracker import HanditTracker

tracker = HanditTracker()
tracker.config(api_key="your-api-key", tracking_url="https://your-custom-tracking-url.com")

2. Automatically Intercept HTTP Requests

Wrap your requests library calls to automatically capture data:

import requests
from handit_tracker import HanditTracker

tracker = HanditTracker()
tracker.config(api_key="your-api-key")

# Intercept requests
@tracker.intercept_requests
def make_request(url, **kwargs):
    return requests.get(url, **kwargs)

response = make_request("https://example.com/api/data")

3. Manually Capture Model Data

Manually capture model input and output data for specific events:

tracker.capture_model(
    model_id="model-slug",
    request_body={"input_key": "input_value"},
    response_body={"output_key": "output_value"}
)

Advanced Features

  1. Update Tracked URLs Dynamically
    The SDK automatically fetches the list of URLs to track from the configured tracking server.

  2. Customizable Model ID Extraction
    Adjust the logic for extracting model_id from the URL based on your API's structure.

  3. Error Handling and Reporting
    Automatically report errors and failed API responses for improved visibility into issues.


Contributing

We welcome contributions! Please visit the GitHub repository to report issues or submit pull requests.


License

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

Metadata

Release files for handit-sdk 1.16.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for handit-sdk 1.16.0
File Size Uploaded
handit_sdk-1.16.0.tar.gz 9.5 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for handit-sdk 1.16.0
File Interpreter ABI Platform
handit_sdk-1.16.0-py3-none-any.whl Python 3 none any Details

Total release size: 17.2 kB

Release files / handit_sdk-1.16.0.tar.gz

Download URL handit_sdk-1.16.0.tar.gz
Size 9.5 kB
Tags Source
SHA-256 checksum
How to use checksums
e71142588d3eee351a919aa644fe6bf51deecd7f6445f91cc00e568abdbd8106
BLAKE2b-256 checksum
How to use checksums
99d035ce4cba537bd8de03c0b84fdc3115fb5c1c71b00e7a879f325cfb8e28fd
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.10.12

Release files / handit_sdk-1.16.0-py3-none-any.whl

Download URL handit_sdk-1.16.0-py3-none-any.whl
Size 7.6 kB
Tags Python 3
SHA-256 checksum
How to use checksums
6d96473cdd2a6269cf8c3f7d34052fbff9acd65093ca6849b568ec126d17aca9
BLAKE2b-256 checksum
How to use checksums
1bbfb65e53665285f6475be1802f9d94faa690631992f549b8a33fe4f323f93e
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.10.12

Release history Release notifications | RSS feed

This release

1.16.0 This release

2 release files

1.15.0

2 release files

1.14.0

2 release files

1.13.0

2 release files

1.12.0

2 release files

1.11.0

2 release files

1.10.0

2 release files

1.9.0

2 release files

1.8.0

2 release files

1.6.0

2 release files

1.5.0

2 release files

1.4.0

2 release files

1.3.0

2 release files

1.2.0

2 release files

1.1.0

2 release files

1.0.0

2 release files

0.1.3

2 release files

0.1.2

2 release files

0.1.1

2 release files

0.1.0

2 release 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