Python Absurd Client Documentation — python-absurd-client 0.1.0 documentation

# Python Absurd Client Documentation

Contents:

- Installation
  - Prerequisites
  - Installation via pip
  - From Source
  - Development Installation
  - Requirements
  - PostgreSQL Setup
  - Connection Requirements
  - Environment Variables
  - Virtual Environment Setup
  - Upgrade Existing Installation
  - Verification
- Quick Start
  - Installation
  - Prerequisites
  - Basic Usage
  - Connection Management
  - Advanced Task Spawning
  - Event-Driven Workflows
  - Checkpoint Management
  - Workflow Tracking
  - Singleton Pattern
- API Reference
  - AbsurdClient Class
  - Exception Classes
  - Helper Functions
- Workflow Tracking
  - Overview
  - Creating Workflow Runs
  - Updating Workflow Status
  - Integration with Tasks
  - Full Workflow Execution Example
  - Using with Highway DSL
- Error Handling
  - AbsurdSleepError
  - Database Errors
  - Validation Errors
  - Event Wait Errors
  - Retry and Failure Handling
  - Connection Errors
  - Exception Handling in Task Processing
  - Advanced Error Handling Patterns
  - Best Practices
- Usage Examples
  - Basic Task Processing
  - Long-Running Tasks with Checkpoints
  - Event-Driven Workflows
  - Retry Strategies
  - Scheduling and Delayed Execution
  - Connection Pooling Example
  - Cancellable Tasks
  - Workflow Tracking Example

# About Absurd

Absurd is a SQL-based durable execution workflow system that uses PostgreSQL as the backend. This Python client provides a convenient interface to interact with Absurd’s PostgreSQL-based task queue and workflow engine.

## Key Features

- Task queuing and processing

- Durable task execution that survives crashes

- Event-driven workflow coordination

- Checkpoint-based state management

- Retry strategies and failure handling

- Workflow run tracking

- Support for complex workflow patterns

- Multi-tenant support (Phase 13)

- Connection pooling for production environments

- Comprehensive error handling

## Getting Started

If you’re new to the Absurd client, start with the Installation guide to set up your environment, then follow the Quick Start to learn the basics.

For advanced use cases and complex workflows, check out the Usage Examples section which provides comprehensive code samples for various scenarios.

## Core Concepts

- Queues: Isolated task processing environments that separate different types of work

- Tasks: Logical units of work that need to be executed

- Runs: Individual execution attempts of a task

- Events: Coordination signals between tasks and workflows

- Checkpoints: Persistent state saved during long-running operations

- Workflows: Orchestrated sequences of related tasks

## Architecture

The Absurd client provides a Python interface to PostgreSQL-stored procedures that manage:

- Task queueing and execution scheduling

- Worker claim management with configurable timeouts

- Event-driven coordination between tasks

- State persistence and checkpoint management

- Retry logic with configurable backoff strategies

- Workflow execution tracking across multiple tasks

# Indices and tables

- Index

- Module Index

- Search Page