Metisse
Metisse is a powerful image recognition and automation package designed to facilitate the development of scripts for mobile devices. It provides an extensive set of tools for image recognition, screenshot manipulation, and user interaction, such as tapping, swiping, and pressing.
Features
- Image recognition using template matching
- Screenshot manipulation, including cropping and saving
- Automation of user interactions, such as tapping, swiping, and pressing
- Customizable parameters for image recognition and automation tasks
- Easy integration with existing automation frameworks
Installation
To install Metisse, run the following command in your terminal:
pip install metisse
Additional Requirements
Android Devices
- Enable Developer Mode on your Android device.
- Turn on USB Debugging (adb) on your Android device.
- Install Android Debug Bridge (adb) on your computer.
- Add adb to your system path.
iOS Devices
- Install Appium/WebDriverAgent on your ios device.
Enabling Developer Mode and USB Debugging (adb) on Android Devices
Follow these steps to enable Developer Mode and USB Debugging on your Android device:
- Open the Settings app on your Android device.
- Scroll down and tap "About phone" or "About device."
- Find the "Build number" or "Software version" and tap it 7 times. You will see a message that you are now a developer.
- Go back to the main Settings menu and tap "Developer options" (it should be visible now).
- Enable "USB Debugging."
Android Debug Bridge (adb) Installation and Configuration
Follow these steps to install and configure adb:
- Download the Android SDK Platform Tools from the following link: https://developer.android.com/studio/releases/platform-tools
- Extract the downloaded zip file to a location of your choice.
- Add the extracted folder to your system's PATH variable.
Usage
Here's a simple example demonstrating how to use Metisse for image recognition and user interaction:
python Copy code
from metisse.metisse import MetisseClass
from metisse.params import ImageRecognitionParams, SaveParams
class script_example(MetisseClass):
def __init__(self, device_id="", relatively_path="", pyqt6_ui_label={}, os_environment=""):
MetisseClass.__init__(
self,
device_id=device_id,
relatively_path=relatively_path,
pyqt6_ui_label=pyqt6_ui_label,
os_environment=os_environment,
)
def __call__(self, *args, **kwargs):
# Your custom script implementation goes here
if __name__ == "__main__":
script_obj = script_example("01234567(test_uid)", None, None, "android")
script_obj()
Here's a function designed to generate a sample project. After running the code, it will create a sample project in the current directory, including a simple script, a device name folder automatically generated after simulating a connection to a device, an icon folder (containing test examples), and a default script GUI (which requires connection to a device to use).
from metisse.metisse import MetisseClass
import metisse.example.generate_example as ex
if __name__ == '__main__':
ex.create_example_py_file()
This is a script structure diagram.
your project
│ script_example.py
│
├───ui
├───icon
│ └───script_example
└───01234567(test_uid)
├───backup
├───log
├───storage
│ └───script_example
└───temp_image
For more detailed information about the available methods and their usage, please refer to the MetisseClass Methods documentation. You can also use this tool for rapid development of automation scripts: AndroidScreenCaptureTool.
Contributing
We welcome contributions to Metisse! If you'd like to contribute, please follow these steps:
- Fork the repository
- Create a new branch for your changes
- Make your changes and test them thoroughly
- Commit your changes and push them to your forked repository
- Create a pull request with a detailed description of your changes
- Please make sure to follow the code style and conventions used in the project.
License
Metisse is licensed under the Apache License 2.0.
Metadata
Release files for metisse 0.0.8
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| metisse-0.0.8.tar.gz | 2.7 MB | Without provenance | Details for metisse-0.0.8.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| metisse-0.0.8-py3-none-any.whl | Python 3 | none | any | Details for metisse-0.0.8-py3-none-any.whl |
Total release size: 5.4 MB
Release files / metisse-0.0.8.tar.gz
| Download URL | metisse-0.0.8.tar.gz |
|---|---|
| Size | 2.7 MB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
381e91cc8951a8e4bfd105d82eddee966923a21f1907e716b39abd8d0399fac1
|
|
BLAKE2b-256 checksum How to use checksums |
dc92243cd3dc194f43e81ad2146a9df579a7aff8ae600e94b217d8439feb0079
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.2 CPython/3.8.18
|
Release files / metisse-0.0.8-py3-none-any.whl
| Download URL | metisse-0.0.8-py3-none-any.whl |
|---|---|
| Size | 2.7 MB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
b94241509e3b529882cad28899ae1b7d543470e1d7f20ca3e11f64353cccf896
|
|
BLAKE2b-256 checksum How to use checksums |
4fd797e4c33bca109f8b908088441309bf8f433f3bd4599b4e8b54f704c7c4f9
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.2 CPython/3.8.18
|
Security for metisse 0.0.8
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.