Skip to main content

rpa-tracker

Python PyPI License Status

rpa-tracker is a lightweight Python library for transaction tracking, retry control, deduplication and auditability in RPA and backend automation workflows.


Install

pip install rpa-tracker

Why rpa-tracker?

It is designed for long-running, multi-platform processes where:

  • a single transaction touches multiple systems
  • retries must be controlled and observable
  • business errors must stop the flow
  • system errors may be retried
  • full traceability is required for operations and reporting

This library focuses on governance and execution control, not orchestration engines or schedulers.


Key Concepts

Transaction

A logical unit of work identified by a UUID.

Platform

A system involved in the transaction flow, defined in a central catalog with execution order and retry policy.

Stage

The execution of a transaction in a specific platform.

Execution Result

Derived from an error code:

  • 0 → success
  • < 0 → system error (retryable)
  • > 0 → business error (non-retryable)

Core Features

  • Transaction lifecycle tracking
  • Platform-based execution flow
  • Configurable retry policies per platform
  • Unlimited or limited retries
  • Business vs system error handling
  • Deduplication strategies per process
  • Full audit trail (events, attempts, timestamps)
  • SQLAlchemy-based persistence
  • Reporting-ready data model
  • Designed for batch / hourly RPA execution

Architecture Overview

Process / Job
   |
   |-- DeduplicationStrategy (process-specific)
   |-- PlatformRegistry (catalog)
   |-- RetryPolicy (per platform)
   |
   |-- SqlTransactionTracker
           |
           |-- TxProcess   (transaction)
           |-- TxStage     (platform execution)
           |-- TxEvent     (attempts / audit)

The tracker does not decide business rules.
It only applies the configuration provided by the process.


Minimal Example

from rpa_tracker.catalog.platform import PlatformDefinition
from rpa_tracker.catalog.registry import PlatformRegistry
from rpa_tracker.retry.policy import RetryPolicy
from rpa_tracker.tracking.sql_tracker import SqlTransactionTracker

PlatformRegistry.register(
    PlatformDefinition(code="A", retry_policy=RetryPolicy(max_attempts=1), order=1)
)

tracker = SqlTransactionTracker(session)
uuid, is_new = tracker.start_or_resume("MY_PROCESS", payload)

Retry Behavior

  • Business errors (error_code > 0)
    → transaction is REJECTED and stops

  • System errors (error_code < 0)
    → stage is TERMINATED and retried based on policy

  • Retry limits are platform-specific

  • Unlimited retries are supported


Transaction Management

Important: rpa-tracker does NOT commit automatically. You control when to commit.

Pattern 1: Commit per transaction

for case in cases:
    tracker.finish_stage(uuid, system, state)
    session.commit()  # Commit each

Pattern 2: Commit per batch (recommended)

for i, case in enumerate(cases):
    tracker.finish_stage(uuid, system, state)
    
    if i % 100 == 0:
        session.commit()  # Commit every 100

session.commit()  # Final commit

Pattern 3: Single transaction

try:
    for case in cases:
        tracker.finish_stage(uuid, system, state)
    
    session.commit()  # All or nothing
except Exception:
    session.rollback()

Reporting

from rpa_tracker.reporting.transaction_report_repository import (
    TransactionReportRepository
)

repo = TransactionReportRepository(session)
repo.summary_by_state(start, end)

Design Principles

  • Explicit configuration over magic
  • Process-driven policies
  • No orchestration assumptions
  • SQL-first, audit-friendly
  • Conservative, production-oriented design

When to Use

  • Multi-platform RPA processes
  • Hourly or batch execution models
  • Strong audit and traceability requirements
  • Controlled retries and failure handling

When NOT to Use

  • Real-time streaming systems
  • Stateless microservices
  • One-step scripts

License

GNU General Public License v3 (GPLv3)


Author

Jonathan Bolo
Senior Software & RPA Architect


JBoloDev

Release files for rpa-tracker 0.0.18

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

Source distribution (sdist)

Source distribution for rpa-tracker 0.0.18
File Size Uploaded
rpa_tracker-0.0.18.tar.gz 22.7 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for rpa-tracker 0.0.18
File Interpreter ABI Platform
rpa_tracker-0.0.18-py3-none-any.whl Python 3 none any Details

Total release size: 49.8 kB

Release files / rpa_tracker-0.0.18.tar.gz

Download URL rpa_tracker-0.0.18.tar.gz
Size 22.7 kB
Tags Source
SHA-256 checksum
How to use checksums
e76b80e8da01fc19326a07d12ba43e1c45fee69590ea5c895a86211021441848
BLAKE2b-256 checksum
How to use checksums
e0545d1ca0d9ff137bfe32831df6e2202868910cdd6ca4e00ec89854d6b9ffb8
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.7

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Jan 16, 2026.

Transparency log

Release files / rpa_tracker-0.0.18-py3-none-any.whl

Download URL rpa_tracker-0.0.18-py3-none-any.whl
Size 27.1 kB
Tags Python 3
SHA-256 checksum
How to use checksums
227c21f973d1ae2718aad3d3bff550b680b818afd653531768a9a7259ce70a22
BLAKE2b-256 checksum
How to use checksums
2c5103644e27b94cca638f7879cc99066530634ffb2feb1de8b1ae50c6e90630
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.7

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Jan 16, 2026.

Transparency log

Release history Release notifications | RSS feed

This release

0.0.18 This release

2 release files

0.0.17

2 release files

0.0.16

2 release files

0.0.14

2 release files

0.0.13

2 release files

0.0.12

2 release files

0.0.10

2 release files

0.0.8

2 release files

0.0.7

2 release files

0.0.5

2 release files

0.0.4

2 release files

0.0.2

2 release files

0.0.1

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