All Projects → dkatz23238 → Pybotlib

dkatz23238 / Pybotlib

Licence: gpl-2.0
Python Robotic Process Automation Library

Programming Languages

python
139335 projects - #7 most used programming language
python27
39 projects

Projects that are alternatives of or similar to Pybotlib

Babushka
Test-driven sysadmin.
Stars: ✭ 794 (+3352.17%)
Mutual labels:  automation
Robotgo
RobotGo, Go Native cross-platform GUI automation @vcaesar
Stars: ✭ 7,095 (+30747.83%)
Mutual labels:  automation
Homebridge Garagedoor Command
Homebridge plugin to control a garage door using command line functions
Stars: ✭ 18 (-21.74%)
Mutual labels:  automation
Webdriverio
Next-gen browser and mobile automation test framework for Node.js
Stars: ✭ 7,214 (+31265.22%)
Mutual labels:  automation
Instagram Profilecrawl
📝 quickly crawl the information (e.g. followers, tags etc...) of an instagram profile.
Stars: ✭ 816 (+3447.83%)
Mutual labels:  automation
Sneaky Scripts
Automated setup of development environments and other miscellaneous scripts.
Stars: ✭ 7 (-69.57%)
Mutual labels:  automation
Webhook
webhook is a lightweight incoming webhook server to run shell commands
Stars: ✭ 7,201 (+31208.7%)
Mutual labels:  automation
Automation Report
Automation report是一款可以解决很多行业领域中设涉及到报告生成的需求,本项目最开始的初衷是为公司内部简化人工流程的一个环节,主要实现目的是将实验室检测得出的下机数据结果与对应的报告模版批量结合生成报告(.pdf)。
Stars: ✭ 22 (-4.35%)
Mutual labels:  automation
Chef
Chef Infra, a powerful automation platform that transforms infrastructure into code automating how infrastructure is configured, deployed and managed across any environment, at any scale
Stars: ✭ 6,766 (+29317.39%)
Mutual labels:  automation
Auto App
Crie um aplicativo com todas as tabelas de um dos seus bancos sem uma linha de código.
Stars: ✭ 18 (-21.74%)
Mutual labels:  automation
Puloversmacrocreator
Automation Utility - Recorder & Script Generator
Stars: ✭ 803 (+3391.3%)
Mutual labels:  automation
Triflejs
Headless automation for Internet Explorer
Stars: ✭ 815 (+3443.48%)
Mutual labels:  automation
Desktop Cleaner
It is a Automated file organizer
Stars: ✭ 16 (-30.43%)
Mutual labels:  automation
Schemats
Generate typescript interface definitions from SQL database schema
Stars: ✭ 799 (+3373.91%)
Mutual labels:  automation
Webdriverio Jest
Example of a WebdriverIO test written with the Jest framework
Stars: ✭ 19 (-17.39%)
Mutual labels:  automation
Archisteamfarm
C# application with primary purpose of idling Steam cards from multiple accounts simultaneously.
Stars: ✭ 7,219 (+31286.96%)
Mutual labels:  automation
Mini Media Player
Minimalistic media card for Home Assistant Lovelace UI
Stars: ✭ 827 (+3495.65%)
Mutual labels:  automation
Supreme
A command line visual file manager for linux
Stars: ✭ 22 (-4.35%)
Mutual labels:  automation
Pre Commit Terraform
pre-commit git hooks to take care of Terraform configurations
Stars: ✭ 902 (+3821.74%)
Mutual labels:  automation
Flaui
UI automation library for .Net
Stars: ✭ 892 (+3778.26%)
Mutual labels:  automation

pybotlib-image

What is pybotlib?

pybotlib is a python library for developing Robotic Process Automation projects easily with python primarily on Linux. It contains the code for a central object that will maintain the state and behavior of the RPA. The focus of the project is to accelerate RPA development at scale using open source technology. The package is split into two parts the pybotlib.VirtualAgent object that will control the overall behavior of your RPA as well as pybotlib.utils that contain many useful functions for RPA developmet purposes. Check out the API Documentation for more details. The project is centered around open technologies and the believe that the future of digital transformation across business is rooted in a shared knowledge economy.

Please refer to the documentation for more details: https://pybotlib.readthedocs.io/en/latest/intro.html

The master branch of pybotlib is developed to run on Windows 10. In order to use pybotlib with Linux refer to the ubuntu-client branch. You can install via pip using linux.

Aimed at outperforming and outcosting closed sourced solutions such as Automation Anywhere or Blueprism, pybotlib consists of a central wrapper around the selenium webdriver exposing highly customized methods and functions through an efficient and easy to use API.

The package's goal is to facilitate the RPA development process and bring Python into the Intelligent Automation and Robotic Process Automation industries.

Some conveniences provided are:

  • Robust methods to navigate business applications frontends oriented towards efficiently managing large scale Automation endeavors

  • RPA logging locally hosted or integrated with Google Cloud StackDriver (coming soon)

  • Documentation and examples to create robust enterprise grade RPAs using python

  • Integration with major platforms for task specific business process automation

Features that are in development:

  • Integration with SAP scripting client
  • Logging with GCP StackDriver
  • Integrations with Google Drive

👨🏻‍💻 Installation

  1. First download or clone the repository and cd into the directory. Make sure Python27 is installed.

  2. Install necessary packages by running the pip command with provided requirements.txt file:

    pip install -r requirements.txt
    
  3. Make sure Google Chrome is installed on the host machine. Be prepared to run the check_and_dl_chrome_driver function provided in the library in order to download the most recent chrome webdriver for process automation. Running the following code will download the latest chromedriver and .crx extensions:

    from pybotlib.utils import check_and_dl_chrome_driver
    # Checks if Google Chrome Driver is found on machine. Downloads if needed.
    check_and_dl_chrome_driver()
    
  4. You are now ready to use the package. Import the VirtualAgent class with the following code:

    from pybotlib import *
    

🤖Example Robot

I have provided an example robot named investigator_RPA.py. This bot will lookup relevant news articles for specific topics provided in a list. Once completed all the steps above run the following lines of code to execute the robot. Feel free to edit and customize the robot on your machine!

python investigator_RPA.py

⚙️ Developing custom RPA's

To create an instance of an active RPA we must instantiate the VirtualAgent class. The instance will be the central object in our workflow and process automation.

human_resources_bot = VirtualAgent(bot_name="HR_bot", downloads_directory="timesheets")
human_resources_bot.create_log_file()
human_resources_bot.initialize_driver()
human_resources_bot.log("WebDriver Initiated")

A common issue in process automation is being able to efficiently identify specific elements within an html front end.

Ideally this should be done with the least lines of code possible.

This is why we have created the find_by_tag_and_attr method that iterates through every single element of a specific tag on a page and evaluates if any of the elements attributes matches the evaluation string provided. Matched elements are returned in a list.

my_robot = VirtualAgent(bot_name="my_robot", downloads_directory="my_robot_downloads_folder")
my_robot.find_by_tag_and_attr(tag, attribute, evaluation_string, sleep_secs)

👁‍🗨 Logging and RPA Auditability

When developing RPAs you usually want to be able to log two different types of events: execution logs and transactional logs. Transactional logs give information about the process you are automating while the execution log provides information on the specific run of an RPA.

Pybotlib creates a folder called pybotlib_logs under the current User's directory. Every RPA has the ability to create and automatically write to its logfile. The log file is CSV file, an example for illustrative purposes is provided below:

idx message tag timestamp tz
0 start execution 2019-01-11 11:44:01.399000 Pacific Standard Time
1 searching edgar for AAPL transaction 2019-01-11 11:44:06.216000 Pacific Standard Time
2 ... ... ... ...
VirtualAgent.create_log_file()

will create the csv used to audit the execution of an RPA. Will also create the first row in log file to signal bot start.

VirtualAgent.log(message)

will directly log a transaction tagged message to the current file.

VirtualAgent.log(message, tag=TAG)

allows users to customize tags

VirtualAgent.log_bot_completion()

will log a message "end" to the log file tagged as execution.

📜 Documentation

Docs coming soon. Stay tuned or sign up for our mailing list here

📃 License

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

📚 Acknowledgments

  • Thanks to @AlSweigart for inspiring this package. After I read his free ebook I was inspired to take his work to the next level and start developing a stack of products for enterprise grade RPA development. pybotlib is the first of many
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].