Automate Core Actions
Project description
AutoCore
Automate Core Actions
A Python library that combines GUI automation, headless browser control and common actions into a single library.
With a single import, we get everything we need to automate repetitive tasks on Windows and Linux, no juggling multiple libraries or complex setup.
Security & Privacy
AutoCore runs entirely on your local machine. No data is sent to any external server at any point.
This makes it suitable for:
- On-premise deployments with strict data security policies.
- Automation involving sensitive or confidential data.
- Compliance-sensitive industries like finance, healthcare and legal.
Platform Support
- Supported: Windows, Linux
- Not Supported: macOS
Installation
This has been fully tested on Python 3.12, using other versions may lead to compatibility issues with dependencies.
pip install autocore
Linux Dependencies
After installing, run the following based on your distro:
# Ubuntu/Debian
sudo apt-get install wmctrl xdotool python3-tk xclip xdg-utils espeak-ng alsa-utils
# RHEL/CentOS/Fedora
sudo yum install wmctrl xdotool python3-tkinter xclip xdg-utils espeak-ng alsa-utils
| Package | Used by | Purpose |
|---|---|---|
wmctrl |
window() |
List, focus, close, minimize, maximize, resize and move windows |
xdotool |
window(), inspect() |
Minimize windows, restore them before resize/move, and get active window title |
python3-tk |
inspect() |
Render the Pixel Inspector GUI window |
xclip |
copy(), inspect() |
Read and write clipboard content via pyperclip |
xdg-utils |
run() |
Open files with their default application via xdg-open |
espeak-ng |
say() |
Text-to-phoneme conversion required internally by piper-tts |
alsa-utils |
say() |
Provides aplay command used to play synthesized audio |
Chrome Installation
AutoCore uses Chrome for browser automation. Install it before using browser().
Windows:
winget install Google.Chrome
Linux (Ubuntu/Debian/Mint):
wget https://dl.google.com/linux/direct/google-chrome-stable_current_amd64.deb
sudo dpkg -i google-chrome-stable_current_amd64.deb
sudo apt-get install -f -y
Linux (RHEL/CentOS/Fedora):
wget https://dl.google.com/linux/direct/google-chrome-stable_current_x86_64.rpm
sudo rpm -i google-chrome-stable_current_x86_64.rpm
Usage
Style 1: Import everything (recommended)
Use functions directly without any prefix:
from autocore import *
click(driver, 'id', 'login-button')
write(driver, 'id', 'username', 'myuser')
press(driver, 'enter')
Style 2: Import as module
Use functions with autocore. prefix:
import autocore
autocore.click(driver, 'id', 'login-button')
autocore.write(driver, 'id', 'username', 'myuser')
autocore.press(driver, 'enter')
Style 3: Import specific functions
Use only what you need:
from autocore import browser, click, write, press
click(driver, 'id', 'login-button')
write(driver, 'id', 'username', 'myuser')
press(driver, 'enter')
Functions
| Function | Description |
|---|---|
browser(url) |
Open Chrome browser and navigate to URL |
click(...) |
Click on image, text, coordinates, color or web element |
click_right(...) |
Right-click on image, text, coordinates, color or web element |
copy(...) |
Copy text from active window, clipboard, coordinates or web element |
csv_to_xlsx(...) |
Convert CSV file to XLSX |
date() |
Current day of month (1-31) |
day() |
Current day of week (monday, tuesday, ...) |
drag(...) |
Drag from source to target |
dropdown_select(...) |
Select item from a dropdown |
erase(...) |
Clear text from input fields |
find_browser(...) |
Find text in browser using Ctrl+F |
find_key(data, key) |
Recursively find all values of a key in nested data |
find_str(...) |
Extract substring between two markers |
hour() |
Current hour (0-23) |
inspect() |
GUI tool to inspect pixel position and color (Windows only) |
log_setup(title) |
Setup logging with terminal color status |
minute() |
Current minute (0-59) |
month() |
Current month (1-12) |
press(...) |
Press keyboard keys |
read(...) |
Read text from screen or browser via OCR or extract text from files |
run(target) |
Run a file or application |
say(text) |
Speak text using offline Text-to-Speech |
screenshot(...) |
Take a screenshot of full screen or region |
scroll(...) |
Scroll up, down, to top or to bottom |
second() |
Current second (0-59) |
wait(...) |
Wait with countdown, wait for element or wait for color |
wait_download(...) |
Monitor downloads folder for completion or fetch via URL |
window(...) |
List, focus, close, minimize, maximize, resize or move windows |
write(...) |
Type text in active window or web element |
year() |
Current year |
zoom(...) |
Zoom in/out by steps or set zoom percentage |
File Formats Supported by read()
| Category | Formats |
|---|---|
| Documents | PDF, DOCX, PPTX, ODT, RTF |
| Tabular | CSV, TSV, XLSX, SQLite |
| Structured | JSON, YAML, XML, INI/CFG |
| Text | TXT, LOG, MD |
| Web | HTML |
| EML, MSG | |
| eBooks | EPUB |
| Scripts | SH, BAT, PY |
Quick Example
from autocore import *
log_setup("demo")
# Open login page in visible browser
dr = browser('https://practice.expandtesting.com/login')
# Open login page in headless browser
# dr = browser('https://practice.expandtesting.com/login', True)
# Scroll to the login form
find_browser(dr, 'secure area')
scroll(dr, 1)
# Login with test credentials
write(dr, 'id', 'username', 'practice')
write(dr, 'id', 'password', 'SuperSecretPassword!')
wait(2)
click(dr, 'id', 'submit-login')
wait(3)
# doing logout
click(dr, 'text', 'Logout')
wait(2)
print("Logout done.")
# showing blank page before moving to next website
dr.get("about:blank")
#====================================================
# Navigate to secure file download page
dr.get('https://practice.expandtesting.com/download')
# Scroll to bottom to make the link visible
scroll(dr, 'bottom')
# Click to download the test file
click(dr, 'text', 'some-file.json')
# Wait for download to finish with timeout of 2 mins
file_location = wait_download(120)
# Announce completion time with voice
say(f"File downloaded at {hour()} hours and {minute()} minutes")
# Closing the browser
dr.quit()
print("Content of downloaded file is : ", read(file_location))
print('bye bye')
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file autocore-1.4.tar.gz.
File metadata
- Download URL: autocore-1.4.tar.gz
- Upload date:
- Size: 55.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
fb55b9e8242e6078076f73f67365b4c34aca66e4e563962790ebea51ddabe382
|
|
| MD5 |
7ab9cc575a05d416a9ed5a17467ea9dd
|
|
| BLAKE2b-256 |
bc1cc97a333810356769d9ac74a4fe00472813bb366cc850f541f5bd662993f7
|
Provenance
The following attestation bundles were made for autocore-1.4.tar.gz:
Publisher:
workflow.yml on AshAutomates/AutoCore
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
autocore-1.4.tar.gz -
Subject digest:
fb55b9e8242e6078076f73f67365b4c34aca66e4e563962790ebea51ddabe382 - Sigstore transparency entry: 1428971735
- Sigstore integration time:
-
Permalink:
AshAutomates/AutoCore@f2d23a5f31c2d2df72312939dba580656c0b3e2f -
Branch / Tag:
refs/tags/v1.4 - Owner: https://github.com/AshAutomates
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
workflow.yml@f2d23a5f31c2d2df72312939dba580656c0b3e2f -
Trigger Event:
release
-
Statement type:
File details
Details for the file autocore-1.4-py3-none-any.whl.
File metadata
- Download URL: autocore-1.4-py3-none-any.whl
- Upload date:
- Size: 53.4 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
8b8532f4e55849fd0bb3eadc12f002442a86d99afbafc96da3a0319e03ee79de
|
|
| MD5 |
90211926d2c0dafc45988227af898196
|
|
| BLAKE2b-256 |
dedf5b436ad81ef7c019144a585b65b729f64b2188dfbd3823be3d06dd7bc939
|
Provenance
The following attestation bundles were made for autocore-1.4-py3-none-any.whl:
Publisher:
workflow.yml on AshAutomates/AutoCore
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
autocore-1.4-py3-none-any.whl -
Subject digest:
8b8532f4e55849fd0bb3eadc12f002442a86d99afbafc96da3a0319e03ee79de - Sigstore transparency entry: 1428971809
- Sigstore integration time:
-
Permalink:
AshAutomates/AutoCore@f2d23a5f31c2d2df72312939dba580656c0b3e2f -
Branch / Tag:
refs/tags/v1.4 - Owner: https://github.com/AshAutomates
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
workflow.yml@f2d23a5f31c2d2df72312939dba580656c0b3e2f -
Trigger Event:
release
-
Statement type: