Skip to content

This project aims to create and consolidate all the basic functionalities that we are likely to need when working with Automation Anywhere + Python

License

Notifications You must be signed in to change notification settings

AND3SIL4/aa-pytools

aa-pytools

PyPI version Python 3.13+ License: MIT

All Python tools you'll likely need to work with Automation Anywhere

aa-pytools is a comprehensive Python library designed to streamline integration between Python applications and Automation Anywhere RPA platform. It provides essential tools, decorators, and utilities that make RPA development more efficient and reliable.

πŸš€ Features

Core Functionality

  • Advanced Logging System - Centralized, configurable logging with auto-configuration
  • Safe Execution Decorator - Error handling with structured payloads and timing information

Automation Anywhere Integration

  • Vault Credential Management - Secure credential fetching from Automation Anywhere vault
  • Execution Management - Run and monitor Automation Anywhere executions from Python
  • REST API Integration - Complete API client for Automation Anywhere services

Specialized Decorators

  • @safe_execute - Execute functions safely with comprehensive error handling
  • @with_vault("SAP") - Automatic credential injection from vault
  • @retry_on_failure - Intelligent retry mechanism for transient failures
  • @timeout(30) - Execution timeout protection
  • @transactional - Transaction management for complex operations
  • @queue_worker("INVOICES") - Queue-based processing capabilities
  • @aa_safe_run - Automation Anywhere-specific safe execution

πŸ“¦ Installation

pip install aa-pytools

Requirements:

  • Python 3.13 or higher
  • No external dependencies for core functionality

🎯 Quick Start

Basic Usage

from aa_pytools.decorators import safe_execute
from aa_pytools.core import get_logger

# Use the safe execution decorator
@safe_execute
def risky_operation(data):
    # Your code here
    return process_data(data)

result = risky_operation(my_data)
if result["status"]:
    print(f"Success: {result['result']}")
else:
    print(f"Error: {result['error']}")

# Logging with auto-configuration
logger = get_logger("my_module")
logger.info("This message will be automatically formatted and handled")

Advanced Logging

from aa_pytools.core import configure_logging, get_logger
from pathlib import Path

# Configure custom logging
configure_logging(
    level="DEBUG",
    log_file=Path("logs/app.log"),
    console=True,
    format_string="%(asctime)s | %(name)s | %(levelname)s | %(message)s"
)

logger = get_logger("my_component")
logger.debug("Detailed debugging information")

πŸ“– Documentation

Core Components

Logging System (aa_pytools.core)

  • Auto-configuring loggers
  • Flexible formatting options
  • Console and file output
  • Package-scoped logging hierarchy

Safe Execution (aa_pytools.decorators.safe_execute)

  • Exception catching and structured error reporting
  • Performance timing information
  • Optional trace information for debugging
  • JSON or dictionary return formats

API Reference

Detailed API documentation is available at https://aa-pytools.readthedocs.io (coming soon).

πŸ§ͺ Development Status

This project is currently in early development (version 0.0.1).

Implemented:

  • βœ… Core logging system with full configuration options
  • βœ… Safe execution decorator with comprehensive error handling
  • βœ… Complete test coverage for implemented features
  • βœ… Modern Python packaging with uv and pyproject.toml

In Progress:

  • πŸ”„ Vault integration for credential management
  • πŸ”„ REST API client for Automation Anywhere
  • πŸ”„ Execution management system
  • πŸ”„ Additional specialized decorators

🀝 Contributing

We welcome contributions! Please see our Contributing Guide for detailed information on:

  • Setting up the development environment
  • Running tests and linting
  • Making pull requests
  • Code style and standards

πŸ“„ License

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

πŸ™ Acknowledgments

Inspired by and built upon concepts from:

  • rpa-automationanywhere - Last update: June 5, 2025
  • automation-anywhere - Last update: August 8, 2023

πŸ“ž Support


Created by @AND3SIL4 at Net Applications

α΄…α΄‡α΄ α΄‡ΚŸα΄α΄˜α΄‡α΄… ʙʏ:
β–„β–ˆβ–ˆβ–ˆβ–ˆβ–„ β–ˆβ–ˆβ–ˆ  β–ˆβ–ˆ β–ˆβ–ˆβ–ˆβ–ˆβ–„  β–ˆβ–ˆβ–ˆβ–ˆβ–„ β–„β–ˆβ–ˆβ–ˆβ–ˆβ–ˆ β–ˆβ–ˆ β–ˆβ–ˆ    β–ˆβ–ˆ  β–ˆβ–ˆ
β–ˆβ–ˆβ–„β–„β–ˆβ–ˆ β–ˆβ–ˆ β–€β–„β–ˆβ–ˆ β–ˆβ–ˆ  β–ˆβ–ˆ  β–„β–„β–ˆβ–ˆ β–€β–€β–€β–„β–„β–„ β–ˆβ–ˆ β–ˆβ–ˆ    β–€β–ˆβ–ˆβ–ˆβ–ˆβ–ˆ
β–ˆβ–ˆ  β–ˆβ–ˆ β–ˆβ–ˆ   β–ˆβ–ˆ β–ˆβ–ˆβ–ˆβ–ˆβ–€  β–„β–„β–„β–ˆβ–€ β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–€ β–ˆβ–ˆ β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆ    β–ˆβ–ˆ
Ιͺ α΄›ΚœΙͺΙ΄α΄‹, α΄›Κœα΄‡Κ€α΄‡κœ°α΄Κ€α΄‡ Ιͺ ᴀᴍ πŸ—Ώ

About

This project aims to create and consolidate all the basic functionalities that we are likely to need when working with Automation Anywhere + Python

Resources

License

Code of conduct

Contributing

Stars

Watchers

Forks

Packages

No packages published