Skip to main content

Python SDK

The HITL.sh Python SDK provides a simple and powerful way to integrate human supervision into your Python applications and AI workflows.
Before configuring the SDK, install the HITL.sh mobile app (App Store | Google Play) since it’s an integral part of the setup.

Installation

Install the SDK using pip:
Or add it to your requirements.txt:

Quick Start

Basic Setup

Handle Review Results

Core Features

Review Management

Create reviews:
Update reviews:
Cancel reviews:

Template Management

Create templates:
List and manage templates:

Webhook Handling

Set up webhook endpoints:

Advanced Features

Async Support

Async client usage:

Batch Operations

Process multiple reviews:

Error Handling

Robust error handling:
Retry logic:

Integration Examples

AI Content Generation

Content moderation workflow:

Data Processing Pipeline

Quality assurance workflow:

Workflow Orchestration

Multi-step review process:

Configuration

Environment Variables

Set configuration via environment:
Use in code:

Client Configuration

Advanced client options:

Best Practices

Performance Optimization

Efficient API usage:

Error Handling

Comprehensive error handling:

Security

Secure API usage:

Next Steps

TypeScript SDK

Use TypeScript for Node.js and browser integrations.

Examples

See more Python integration examples and use cases.

API Reference

Complete API documentation for custom integrations.