tebelorg /RPA-Python

Python package for doing RPA

★ 5,506⑂ 723👁 107⑃ 7● 560▤ 51
PythonCreated 2019-03-31
5,506
stars
+0+2+4
723
forks
107
watchers
7
prs
560
issues
51
releases
–
discussions

README

RPA for Python :snake:

v1.50 • Use Cases • API Reference • About & Credits • Try on Cloud • PyCon Video • Telegram Chat • 中文 • हिन्दी • Español • Français • عربى • বাংলা • Русский • Português • Bahasa • Deutsch • More..

!RPA for Python demo in Jupyter notebook

To install this Python package for RPA (robotic process automation) -

pip install rpa


To use it in Jupyter notebook, Python script or interactive shell -
python
import rpa as r


Notes on operating systems and optional visual automation mode -
- :rainbow_flag: Windows - if visual automation is faulty, try setting your display zoom level to recommended % or 100%
- :apple: macOS - due to tighter security, install PHP manually and see solutions for PhantomJS and Java popups
- :penguin: Linux - visual automation mode requires special setup on Linux, see how to install OpenCV and Tesseract
- :grapes: Raspberry Pi - use this setup guide to run the package on Raspberry Pies (low-cost automation servers)

 Use Cases

RPA for Python's simple and powerful API makes robotic process automation fun! You can use it to quickly automate away repetitive time-consuming tasks on websites, desktop applications, or the command line.

As a token of my appreciation, any new bug reported will be appreciated with a US$200 gift card from your preferred merchant. Any feature suggestion accepted will be appreciated with a US$100 gift card.

 WEB AUTOMATION
python
r.init()
r.url('https://duckduckgo.com')
r.type('//[@name="q"]', 'decentralisation[enter]')
r.wait()  ensure results are fully loaded
r.snap('page', 'results.png')
r.close()


 VISUAL AUTOMATION
python
r.init(visual_automation = True)
r.dclick('outlook_icon.png')
r.click('new_mail.png')
...
r.type('message_box.png', 'Hi Gillian,[enter]This is ...')
r.click('send_button.png')
r.close()


 OCR AUTOMATION
python
r.init(visual_automation = True, chrome_browser = False)
print(r.read('pdf_report_window.png'))
print(r.read('image_preview.png'))
r.hover('anchor_element.png')
print(r.read(r.mouse_x(), r.mouse_y(), r.mouse_x() + 400, r.mouse_y() + 200))
r.close()


 KEYBOARD AUTOMATION
python
r.init(visual_automation = True, chrome_browser = False)
r.keyboard('[cmd][space]')
r.keyboard('safari[enter]')
r.keyboard('[cmd]t')
r.keyboard('snatcher[enter]')
r.wait(2.5)
r.snap('page.png', 'results.png')
r.close()


 MOUSE AUTOMATION
python
r.init(visual_automation = True)
r.type(600, 300, 'neo kobe city')
r.click(900, 300)
r.snap('page.png', 'results.png')
r.hover('button_to_drag.png')
r.mouse('down')
r.hover(r.mouse_x() + 300, r.mouse_y())
r.mouse('up')
r.close()


 API Reference

Notes • Element Identifiers • Core Functions • Basic Functions • Pro Functions • Helper Functions

---

 GENERAL NOTES

See sample Python script, the RPA Challenge solution, 

Snapshot: 2026-11-04T14:00:00Z · Data license Apache-2.0 · JSON