Skip to main content

RPA Suite

RPA Suite

A comprehensive Python toolkit for Robotic Process Automation (RPA) development

PyPI Downloads PyPI version Python versions License: MIT

DocumentationInstallationQuick StartFeaturesContributing


Overview

RPA Suite is a powerful and versatile Python library designed to streamline and optimize the development of Robotic Process Automation (RPA) projects. Built with simplicity and efficiency in mind, it provides a comprehensive set of tools that make automation development faster, more reliable, and more maintainable.

Whether you're working with Selenium, Botcity, or building custom automation solutions, RPA Suite offers the essential utilities you need to accelerate your development process.

Key Features

  • 🕐 Time Management - Schedule executions, wait for specific times, and manage time-based automation flows
  • 📧 Email Automation - Send emails via SMTP with HTML support and attachments
  • 📝 Logging System - Comprehensive logging with file and stream support using Loguru
  • 📁 File Operations - Screenshot capture, file counting, and flag file management
  • 🗂️ Directory Management - Create and manage temporary directories with ease
  • 🔍 Text Processing - Pattern matching, regex operations, and text validation
  • 🌐 Browser Automation - Selenium-based browser control with Chrome support (optional)
  • ⚡ Parallel & Async Execution - Run processes in parallel or asynchronously
  • 🤖 Desktop Automation - PyAutoGUI-based desktop automation (Artemis module)
  • 📄 OCR with AI - Document conversion with OCR capabilities (Iris module - optional)
  • 💾 Database Tracking - Complete execution tracking and management system with multi-database support (SQLite, PostgreSQL, MySQL, SQL Server)
  • 🎨 Colored Console Output - Beautiful terminal output with color-coded messages
  • ✅ Data Validation - Email validation and pattern checking utilities

Installation

Basic Installation

Install RPA Suite using pip:

pip install rpa-suite

Or using conda:

conda install -c conda-forge rpa-suite

Optional Dependencies

Install only the extras you need:

# Browser automation (Selenium)
pip install rpa-suite[browser]

# Fuzzy image matching for Artemis (confidence)
pip install rpa-suite[opencv]

# OCR with AI (Iris module)
pip install rpa-suite[ocr]

# HTML dashboard (Flask)
pip install rpa-suite[dashboard]

# Database backends (SQLite is built-in)
pip install rpa-suite[postgres]
pip install rpa-suite[mysql]
pip install rpa-suite[sqlserver]

# All optional features
pip install rpa-suite[all]

Desktop automation (Artemis) is included in the base install (pyautogui). Fuzzy matching via confidence needs the optional extra rpa-suite[opencv].

Quick Start

After installation, import and use RPA Suite immediately:

from rpa_suite import rpa

# Send an email
rpa.email.send_smtp(
    email_user="your@email.com",
    email_password="your_password",
    email_to="recipient@email.com",
    subject_title="Hello from RPA Suite",
    body_message="<p>This is a test email</p>"
)

# Schedule a function to run at a specific time
rpa.clock.exec_at_hour('14:30', my_function, arg1, arg2)

# Wait before executing a function
rpa.clock.wait_for_exec(30, my_function)

# Take a screenshot
rpa.file.screen_shot(filename="screenshot.png")

# Print colored messages
rpa.success_print("Operation completed successfully!")
rpa.error_print("An error occurred!")

Database Module Example

Track your automation executions with the Database module. Prefer process_queue() (or claim_next_item_from_queue()) over a manual peek + start — claim is atomic.

from rpa_suite import rpa

# Initialize database (SQLite by default)
db = rpa.database()

# Start tracking an execution
exec_id = db.start_execution(automation_name="My Automation Bot")

# Add items to the processing queue
db.add_items(execution_id=exec_id, items=[
    {"item_identifier": "invoice_001", "item_data": {"value": 150.00}},
    {"item_identifier": "invoice_002", "item_data": {"value": 320.50}},
])

def handle_item(item: dict) -> str:
    # ... your processing logic here ...
    return f"Processed {item['item_identifier']}"

stats = db.process_queue(exec_id, handler=handle_item)
db.add_log_info(f"Queue done: {stats}", execution_id=exec_id)
db.finish_execution(exec_id, status="completed")

# Check the results
stats = db.get_statistics(execution_id=exec_id)

Requirements

Core Dependencies

  • Python 3.11+
  • colorama
  • email-validator
  • loguru
  • pillow
  • pyautogui
  • requests

Optional Dependencies

  • rpa-suite[browser] — selenium, webdriver-manager
  • rpa-suite[opencv] — opencv-python (Artemis confidence)
  • rpa-suite[ocr] — docling (Iris)
  • rpa-suite[dashboard] — flask
  • rpa-suite[postgres] — psycopg2-binary
  • rpa-suite[mysql] — mysql-connector-python
  • rpa-suite[sqlserver] — pyodbc (plus a system ODBC driver)

Features in Detail

Time Management (Clock Module)

Control execution timing and scheduling:

  • exec_at_hour() - Execute functions at specific times
  • wait_until_hour() - Block until a given HH:MM clock time
  • wait_for_exec() - Wait before executing functions
  • exec_and_wait() - Execute and wait pattern

Email (Email Module)

Send emails with full SMTP support:

  • HTML email support
  • File attachments
  • Custom SMTP configuration
  • Email validation

Logging (Log Module)

Comprehensive logging system based on Loguru:

  • File and console logging
  • Multiple log levels (debug, info, warning, error, critical)
  • Configurable log formats
  • Automatic log rotation

File Operations (File Module)

File and screenshot management:

  • Screenshot capture with custom naming
  • Flag file creation/deletion for process tracking
  • Wait for a download to finish (wait_for_file)
  • Read/write CSV without pandas
  • Copy, move, zip/unzip, and HTTP download
  • File counting with extension filtering

Date (Date Module)

  • get_dmy() / get_hms() - current day/month/year and hour/minute/second
  • stamp() - filename-friendly timestamp (dd_mm_YYYY-HH_MM_SS)
  • today_br() - current date as dd/mm/YYYY
  • shift_days() - day/month/year shifted by N days

Directory (Directory Module)

  • create_temp_dir() / delete_temp_dir() - create and remove a temp folder (reuses if it exists)
  • temp_dir() - context manager: create, use, then delete
  • ensure_dir() - create a path if missing
  • clear_dir() - empty a folder without removing the folder itself

Utils

  • set_importable_dir() - add the project path to sys.path
  • keep_awake() - Windows context manager to prevent sleep/lock (with rpa.utils.keep_awake():)

Database Tracking (Database Module)

Complete execution lifecycle management:

  • Multi-database support (SQLite, PostgreSQL, MySQL, SQL Server)
  • Execution tracking with status management
  • Atomic item queue (claim_next_item_from_queue, process_queue)
  • Automatic interruption detection
  • Reprocessing capabilities
  • Comprehensive statistics and reporting
  • Structured logging integration

Module Structure

Core Modules

  • clock - Time management and scheduling
  • date - Date and time formatting utilities
  • email - SMTP email sending
  • file - File operations and screenshots
  • directory - Directory management
  • log - Logging system
  • printer - Colored console output
  • regex - Pattern matching and regex operations
  • validate - Data validation utilities
  • notifier - Slack / Teams / Telegram webhooks
  • retry - Retry decorator with backoff

Advanced Modules

  • database - Execution tracking and database management (SQLite, PostgreSQL, MySQL, SQL Server)
  • browser - Selenium-based browser automation (pip install rpa-suite[browser])
  • parallel - Parallel process execution (rpa.parallel)
  • asyn - Asynchronous execution (rpa.asyn)
  • artemis - Desktop automation with PyAutoGUI (pip install rpa-suite[opencv] for confidence)
  • iris - OCR and document conversion (pip install rpa-suite[ocr])

Database Module Methods

Execution Management:

  • start_execution() - Start tracking a new execution
  • finish_execution() - Complete an execution
  • get_execution() - Retrieve execution details
  • get_executions() - List executions with filtering
  • detect_and_mark_interrupted_executions() - Auto-detect and mark interrupted executions

Item Processing:

  • add_item() - Add item to processing queue
  • add_items() - Batch add items
  • claim_next_item_from_queue() - Atomically claim the next item (preferred)
  • process_queue() - Claim → handler → finish loop
  • get_next_item_from_queue() - Read-only peek; does not change status
  • start_processing_item() - Mark item as processing (non-atomic alternative)
  • update_checkpoint() - Update processing checkpoint
  • finish_item() - Complete item processing
  • get_item() - Get item details
  • get_items() - List items with filtering
  • detect_and_mark_interrupted_items() - Auto-detect and mark interrupted items

Reprocessing:

  • is_reprocessable() - Check if an item is eligible for reprocessing
  • can_reprocess_execution() - Check if execution can be reprocessed
  • reprocess_interrupted_execution() - Restart interrupted execution
  • can_reprocess_item() - Check if item can be reprocessed
  • reprocess_interrupted_item() - Restart interrupted item
  • reprocess_items_from_execution() - Batch reprocess eligible items from an execution

Maintenance (Safe):

  • clear_pending_items() - Remove pending items
  • clear_interrupted_items() - Remove interrupted items
  • clear_interrupted_executions() - Remove interrupted executions

Maintenance (Protected - requires confirmation code):

  • clear_successful_items() - Remove successful items
  • clear_failed_items() - Remove failed items
  • clear_successful_executions() - Remove successful executions
  • clear_failed_executions() - Remove failed executions

Maintenance (Full - requires confirmation):

  • clear_executions_table() - Clear all executions
  • clear_items_table() - Clear all items
  • clear_logs_table() - Clear all logs
  • clear_database() - Clear entire database

Logging:

  • add_log() - Add log entry with custom level
  • add_log_debug() - Add DEBUG level log
  • add_log_info() - Add INFO level log
  • add_log_warn() / add_log_warning() - Add WARNING level log
  • add_log_error() - Add ERROR level log
  • add_log_critical() - Add CRITICAL level log
  • add_log_success() - Add SUCCESS level log
  • get_logs() - Retrieve execution logs
  • clear_logs() - Clear execution logs

Statistics:

  • get_statistics() - Get comprehensive statistics

Documentation

For detailed documentation, usage examples, and API reference, visit:

Contributing

Contributions are welcome! If you'd like to contribute to RPA Suite:

  1. Fork the repository
  2. Create your feature branch (git checkout -b feature/amazing-feature)
  3. Commit your changes (git commit -m 'Add some amazing feature')
  4. Push to the branch (git push origin feature/amazing-feature)
  5. Open a Pull Request

License

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

Author

Camilo Costa de Carvalho


⬆ Back to Top

Made with ❤️ for the RPA community

Release files for rpa-suite 1.9.2

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-suite 1.9.2
File Size Uploaded
rpa_suite-1.9.2.tar.gz 109.3 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for rpa-suite 1.9.2
File Interpreter ABI Platform
rpa_suite-1.9.2-py3-none-any.whl Python 3 none any Details

Total release size: 241.1 kB

Release files / rpa_suite-1.9.2.tar.gz

Download URL rpa_suite-1.9.2.tar.gz
Size 109.3 kB
Tags Source
SHA-256 checksum
How to use checksums
162c464cf849c89cf7a4fb80e5f27d3a2950569faf1142e521c200ade130c08c
BLAKE2b-256 checksum
How to use checksums
1c368d1ee2f8a1d899396e53e83c5d7251107384371d89929feef48deac9217a
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.13.3

Release files / rpa_suite-1.9.2-py3-none-any.whl

Download URL rpa_suite-1.9.2-py3-none-any.whl
Size 131.7 kB
Tags Python 3
SHA-256 checksum
How to use checksums
b640149d5828109a32ddbf32bdabc2dfc0865fe0383b01fc06cec076dda83a9e
BLAKE2b-256 checksum
How to use checksums
68bf762e68fc7895dae8268d5703b309eef8926d82b2ed56393eed5885dee31f
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.13.3

Release history Release notifications | RSS feed

This release

1.9.2 This release

2 release files

1.9.1

2 release files

1.9.0

2 release files

1.8.0

2 release files

1.7.5

2 release files

1.7.1

2 release files

1.7.0

2 release files

1.6.6

2 release files

1.6.5

2 release files

1.6.4

2 release files

1.6.3

2 release files

1.6.2

2 release files

1.6.1

2 release files

1.6.0

2 release files

1.5.9

2 release files

1.5.8

2 release files

1.5.7

2 release files

1.5.6

2 release files

1.5.5

2 release files

1.5.4

2 release files

1.5.3

2 release files

1.5.2

2 release files

1.5.1

2 release files

1.5.0

2 release files

1.4.9

2 release files

1.4.8

2 release files

1.4.6

2 release files

1.4.5

2 release files

1.4.2

2 release files

1.3.2

2 release files

1.3.1

2 release files

1.3.0

2 release files

1.2.0

2 release files

1.1.9

2 release files

1.1.8

2 release files

1.1.7

2 release files

1.1.6

2 release files

1.1.5

2 release files

1.1.4

2 release files

1.1.3

2 release files

1.1.2

2 release files

1.0.3

2 release files

1.0.2

2 release files

1.0.1

2 release files

1.0.0

2 release files

0.9.4

2 release files

0.9.3

2 release files

0.9.1

2 release files

0.9.0

2 release files

0.8.9

2 release files

0.8.8

2 release files

0.8.7

2 release files

0.8.6

2 release files

0.8.5

2 release files

0.8.4

2 release files

0.8.3

2 release files

0.8.2

2 release files

0.8.1

2 release files

0.8.0

2 release files

0.7.9

2 release files

0.7.8

2 release files

0.7.7

2 release files

0.7.6

2 release files

0.7.5

2 release files

0.7.4

2 release files

0.7.3

2 release files

0.7.2

2 release files

0.7.1

2 release files

0.7.0

2 release files

0.6.9

2 release files

0.6.8

2 release files

0.6.7

2 release files

0.6.6

2 release files

0.6.5

2 release files

0.6.4

2 release files

0.6.3

2 release files

0.6.2

2 release files

0.6.1

2 release files

0.6.0

2 release files

0.5.1

2 release files

0.5.0

2 release files

0.4.9

2 release files

0.4.8

2 release files

0.4.7

2 release files

0.4.6

2 release files

0.4.5

2 release files

0.4.4

2 release files

0.4.3

2 release files

0.4.1

2 release files

0.4.0

2 release files

0.3.9

2 release files

0.3.8

2 release files

0.3.7

2 release files

0.3.6

2 release files

0.3.5

2 release files

0.3.4

2 release files

0.2.9

2 release files

0.2.8

2 release files

0.2.7

2 release files

0.2.6

2 release files

0.2.5

2 release files

0.2.4

2 release files

0.2.2

2 release files

0.2.1

2 release files

0.2

2 release files

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