PymordialBlue: Advanced Android Automation for BlueStacks using Pymordial
Project description
PymordialBlue
Advanced Android Automation for BlueStacks
PymordialBlue is a powerful extension of the Pymordial framework, specialized for automating Android applications on the BlueStacks emulator. It provides a robust, high-performance interface for controlling apps, interacting with UI elements, and performing OCR-based text extraction.
🚀 Features
- BlueStacks Integration: Native control of the BlueStacks player process (start, stop, load detection).
- High-Performance Streaming: Uses
screenrecordandPyAVfor low-latency (<100ms) screen capture, far faster than traditional ADB screencap. - Smart UI Detection: Find elements by:
- Image: Template matching with scale and confidence awareness.
- Pixel: Fast color checks at specific coordinates.
- Text: Tesseract OCR integration for reading dynamic text.
- Robust Lifecycle Management: State machines for Apps (CLOSED -> LOADING -> READY) and Emulator (CLOSED -> LOADING -> READY).
- Resilient ADB: Auto-reconnection, key event injection, and shell command execution.
- Typed Configuration: Full type hinting and validation for all config options.
🛠️ Installation
PymordialBlue is managed with uv.
# Clone the repository
git clone https://github.com/IAmNo1Special/PymordialBlue.git
cd PymordialBlue
# Sync dependencies (including local Pymordial)
uv sync
⚡ Quick Start
Here is a minimal example to connect to BlueStacks and capture the screen:
from pymordialblue import PymordialBluestacksController
# Initialize controller (auto-detects BlueStacks and ADB)
controller = PymordialBluestacksController()
# Connect and verify state
if controller.is_bluestacks_ready():
print("BlueStacks is ready!")
# Capture a frame
frame = controller.capture_screen()
print(f"Captured frame shape: {frame.shape}")
# Go home
controller.go_home()
📚 Documentation
Full documentation is available in the docs/ directory or via the MkDocs site.
📂 Project Structure
src/pymordialblue: Core package source.devices/: Device implementations (ADB, UI, BlueStacks).utils/: Configuration and helper strategies.
examples/: Runnable scripts demonstrating key features.docs/: Markdown documentation.
🤝 Contributing
Contributions are welcome! Please read CONTRIBUTING.md before submitting a pull request.
Project details
Release history Release notifications | RSS feed
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 pymordialblue-0.1.1.tar.gz.
File metadata
- Download URL: pymordialblue-0.1.1.tar.gz
- Upload date:
- Size: 39.4 MB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
745584424182f2398ed9ce525bf25eaad75ae775eeec228046029fc41349ba79
|
|
| MD5 |
db8f715f50ec4e3b8fe8873cba8416ee
|
|
| BLAKE2b-256 |
d3d8e53c406047a5480114d2a8c97072d80cdc66c1551cce89da55ac2022512b
|
Provenance
The following attestation bundles were made for pymordialblue-0.1.1.tar.gz:
Publisher:
release.yml on IAmNo1Special/PymordialBlue
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
pymordialblue-0.1.1.tar.gz -
Subject digest:
745584424182f2398ed9ce525bf25eaad75ae775eeec228046029fc41349ba79 - Sigstore transparency entry: 854436538
- Sigstore integration time:
-
Permalink:
IAmNo1Special/PymordialBlue@3d5fa8fb6c80deee3e5c0dc1e9edae31a9170530 -
Branch / Tag:
refs/tags/v0.1.1 - Owner: https://github.com/IAmNo1Special
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@3d5fa8fb6c80deee3e5c0dc1e9edae31a9170530 -
Trigger Event:
push
-
Statement type:
File details
Details for the file pymordialblue-0.1.1-py3-none-any.whl.
File metadata
- Download URL: pymordialblue-0.1.1-py3-none-any.whl
- Upload date:
- Size: 39.4 MB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
60261493074481c0903705dddf816b01ca2a53c5231858a766759317a4329df6
|
|
| MD5 |
4b5f2a1581b4748b7695a21f5423089c
|
|
| BLAKE2b-256 |
8e470e65618fc4b75c99bc79692688c9017c41298774776ec07ec1f3b6f928dd
|
Provenance
The following attestation bundles were made for pymordialblue-0.1.1-py3-none-any.whl:
Publisher:
release.yml on IAmNo1Special/PymordialBlue
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
pymordialblue-0.1.1-py3-none-any.whl -
Subject digest:
60261493074481c0903705dddf816b01ca2a53c5231858a766759317a4329df6 - Sigstore transparency entry: 854436573
- Sigstore integration time:
-
Permalink:
IAmNo1Special/PymordialBlue@3d5fa8fb6c80deee3e5c0dc1e9edae31a9170530 -
Branch / Tag:
refs/tags/v0.1.1 - Owner: https://github.com/IAmNo1Special
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@3d5fa8fb6c80deee3e5c0dc1e9edae31a9170530 -
Trigger Event:
push
-
Statement type: