easy-uiauto 0.0.1__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 Poggi-Tang
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
@@ -0,0 +1,182 @@
1
+ Metadata-Version: 2.4
2
+ Name: easy_uiauto
3
+ Version: 0.0.1
4
+ Summary: UI automation toolkit based on pyautogui and uiautomation
5
+ Author-email: Poggi-Tang <2322806855@qq.com>
6
+ Project-URL: Homepage, https://github.com/Poggi-Tang/easyautomation
7
+ Project-URL: Repository, https://github.com/Poggi-Tang/easyautomation.git
8
+ Project-URL: Issues, https://github.com/Poggi-Tang/easyautomation/issues
9
+ Project-URL: Changelog, https://github.com/Poggi-Tang/easyautomation/blob/master/CHANGELOG.md
10
+ Project-URL: Documentation, https://github.com/Poggi-Tang/easyautomation/blob/master/README.md
11
+ Keywords: auto,ui,uiauto,automation,gui-testing
12
+ Classifier: Development Status :: 3 - Alpha
13
+ Classifier: Intended Audience :: Developers
14
+ Classifier: License :: OSI Approved :: MIT License
15
+ Classifier: Operating System :: Microsoft :: Windows
16
+ Classifier: Programming Language :: Python :: 3
17
+ Classifier: Programming Language :: Python :: 3.10
18
+ Classifier: Programming Language :: Python :: 3.11
19
+ Classifier: Topic :: Software Development :: Libraries :: Python Modules
20
+ Classifier: Topic :: Software Development :: Testing
21
+ Requires-Python: >=3.11
22
+ Description-Content-Type: text/markdown
23
+ License-File: LICENSE
24
+ Requires-Dist: pyautogui>=0.9.54
25
+ Requires-Dist: pynput>=1.8.1
26
+ Requires-Dist: uiautomation>=2.0.29
27
+ Requires-Dist: pyperclip>=1.8.0
28
+ Requires-Dist: build>=1.4.0
29
+ Dynamic: license-file
30
+
31
+ # easyuiauto
32
+
33
+ English | [简体中文](README_CN.md)
34
+
35
+ [![PyPI](https://img.shields.io/pypi/v/easyuiauto)](https://pypi.org/project/easyuiauto/)
36
+ [![Python](https://img.shields.io/pypi/pyversions/easyuiauto)](https://pypi.org/project/easyuiauto/)
37
+ [![License](https://img.shields.io/github/license/Poggi-Tang/easyautomation)](LICENSE)
38
+ [![CI](https://github.com/Poggi-Tang/easyautomation/actions/workflows/ci.yml/badge.svg)](https://github.com/Poggi-Tang/easyautomation/actions/workflows/ci.yml)
39
+ [![Publish](https://github.com/Poggi-Tang/easyautomation/actions/workflows/publish.yml/badge.svg)](https://github.com/Poggi-Tang/easyautomation/actions/workflows/publish.yml)
40
+
41
+ `easyuiauto` is a UI automation toolkit based on pyautogui and uiautomation.
42
+
43
+ It provides a comprehensive set of APIs for GUI automation, including mouse control, keyboard input,
44
+ window management, and control location. It is suitable for automated testing, RPA (Robotic Process
45
+ Automation), and other desktop automation scenarios.
46
+
47
+ ## Features
48
+
49
+ - Mouse control: click, double-click, right-click, drag and drop
50
+ - Keyboard input: text input, key press/release, combination keys
51
+ - Window management: activate, maximize, switch windows
52
+ - Control location: XPath-based positioning, image recognition
53
+ - Visual feedback: real-time control highlighting during recording
54
+ - Action recording: record user interactions and generate scripts
55
+ - Rich text field support: clipboard-based text input
56
+ - Cross-framework support: Win32, Qt, and other UI frameworks
57
+
58
+ ## Installation
59
+
60
+ Install from PyPI:
61
+
62
+ ```bash
63
+ pip install easyuiauto
64
+ ```
65
+
66
+ Or install from source:
67
+
68
+ ```bash
69
+ git clone https://github.com/Poggi-Tang/easyautomation.git
70
+ cd easyuiauto
71
+ pip install -e .
72
+ ```
73
+
74
+ ## Quick Start
75
+
76
+ ### Basic Control Operations
77
+
78
+ ```python
79
+ from easyuiauto.ctrl import KlController
80
+
81
+ # Left click on a control
82
+ KlController.kl_left_click(
83
+ ActionTitle="Click OK Button",
84
+ WindowName="My Application",
85
+ Name="OK",
86
+ ClassName=None,
87
+ ControlType="ButtonControl",
88
+ foundIndex=0,
89
+ AutomationId="",
90
+ Xpath=[],
91
+ Img="",
92
+ PARAMETERS={}
93
+ )
94
+
95
+ # Input text into a field
96
+ KlController.kl_input_text(
97
+ ActionTitle="Enter Username",
98
+ WindowName="Login Dialog",
99
+ Name="Username",
100
+ ClassName=None,
101
+ ControlType="EditControl",
102
+ foundIndex=0,
103
+ AutomationId="",
104
+ Xpath=[],
105
+ Img="",
106
+ PARAMETERS={"输入文本": "test_user"}
107
+ )
108
+
109
+ # Keyboard shortcut
110
+ KlController.kl_key_group(
111
+ ActionTitle="Save File",
112
+ WindowName="Notepad",
113
+ Name="",
114
+ ClassName=None,
115
+ ControlType="",
116
+ foundIndex=0,
117
+ AutomationId="",
118
+ Xpath=[],
119
+ Img="",
120
+ PARAMETERS={"组合键": "ctrl+s"}
121
+ )
122
+ ```
123
+
124
+ ### Recording User Actions
125
+
126
+ ```python
127
+ from easyuiauto.record import run_record
128
+
129
+ # Start recording user actions
130
+ run_record(write_file=True)
131
+ # Press ESC to stop recording
132
+ # Generated script will be saved to Record{timestamp}.py
133
+ ```
134
+
135
+ ## Project Structure
136
+
137
+ ```text
138
+ easyuiauto
139
+ ├── .github/
140
+ │ └── workflows/
141
+ │ ├── ci.yml
142
+ │ ├── publish.yml
143
+ │ └── release.yml
144
+ ├── src/
145
+ │ └── easyuiauto/
146
+ │ ├── __init__.py
147
+ │ ├── ctrl.py # Core controller (mouse/keyboard actions)
148
+ │ ├── draw.py # Visual feedback (control highlighting)
149
+ │ ├── record.py # Action recording
150
+ │ └── utils.py # Utility functions (control location, caching)
151
+ ├── tests/
152
+ ├── CHANGELOG.md
153
+ ├── LICENSE
154
+ ├── README.md
155
+ ├── README_CN.md
156
+ └── pyproject.toml
157
+ ```
158
+
159
+ ## Release Automation
160
+
161
+ This repository is prepared for a professional Python package workflow:
162
+
163
+ - **CI** runs lint and tests on push and pull request.
164
+ - **Semantic Release** updates the version, changelog, tag, and GitHub Release.
165
+ - **Trusted Publishing** publishes to PyPI from GitHub Actions without a PyPI API token.
166
+ - **Build artifacts** include both source distribution and wheel.
167
+
168
+ ## Development
169
+
170
+ ```bash
171
+ pip install -e .[dev]
172
+ pytest
173
+ ruff check .
174
+ ```
175
+
176
+ ## Usage Examples
177
+
178
+ For more examples, please refer to the test files in the `test/` directory or check the docstrings in the source code.
179
+
180
+ ## License
181
+
182
+ MIT License. See [LICENSE](LICENSE).
@@ -0,0 +1,152 @@
1
+ # easyuiauto
2
+
3
+ English | [简体中文](README_CN.md)
4
+
5
+ [![PyPI](https://img.shields.io/pypi/v/easyuiauto)](https://pypi.org/project/easyuiauto/)
6
+ [![Python](https://img.shields.io/pypi/pyversions/easyuiauto)](https://pypi.org/project/easyuiauto/)
7
+ [![License](https://img.shields.io/github/license/Poggi-Tang/easyautomation)](LICENSE)
8
+ [![CI](https://github.com/Poggi-Tang/easyautomation/actions/workflows/ci.yml/badge.svg)](https://github.com/Poggi-Tang/easyautomation/actions/workflows/ci.yml)
9
+ [![Publish](https://github.com/Poggi-Tang/easyautomation/actions/workflows/publish.yml/badge.svg)](https://github.com/Poggi-Tang/easyautomation/actions/workflows/publish.yml)
10
+
11
+ `easyuiauto` is a UI automation toolkit based on pyautogui and uiautomation.
12
+
13
+ It provides a comprehensive set of APIs for GUI automation, including mouse control, keyboard input,
14
+ window management, and control location. It is suitable for automated testing, RPA (Robotic Process
15
+ Automation), and other desktop automation scenarios.
16
+
17
+ ## Features
18
+
19
+ - Mouse control: click, double-click, right-click, drag and drop
20
+ - Keyboard input: text input, key press/release, combination keys
21
+ - Window management: activate, maximize, switch windows
22
+ - Control location: XPath-based positioning, image recognition
23
+ - Visual feedback: real-time control highlighting during recording
24
+ - Action recording: record user interactions and generate scripts
25
+ - Rich text field support: clipboard-based text input
26
+ - Cross-framework support: Win32, Qt, and other UI frameworks
27
+
28
+ ## Installation
29
+
30
+ Install from PyPI:
31
+
32
+ ```bash
33
+ pip install easyuiauto
34
+ ```
35
+
36
+ Or install from source:
37
+
38
+ ```bash
39
+ git clone https://github.com/Poggi-Tang/easyautomation.git
40
+ cd easyuiauto
41
+ pip install -e .
42
+ ```
43
+
44
+ ## Quick Start
45
+
46
+ ### Basic Control Operations
47
+
48
+ ```python
49
+ from easyuiauto.ctrl import KlController
50
+
51
+ # Left click on a control
52
+ KlController.kl_left_click(
53
+ ActionTitle="Click OK Button",
54
+ WindowName="My Application",
55
+ Name="OK",
56
+ ClassName=None,
57
+ ControlType="ButtonControl",
58
+ foundIndex=0,
59
+ AutomationId="",
60
+ Xpath=[],
61
+ Img="",
62
+ PARAMETERS={}
63
+ )
64
+
65
+ # Input text into a field
66
+ KlController.kl_input_text(
67
+ ActionTitle="Enter Username",
68
+ WindowName="Login Dialog",
69
+ Name="Username",
70
+ ClassName=None,
71
+ ControlType="EditControl",
72
+ foundIndex=0,
73
+ AutomationId="",
74
+ Xpath=[],
75
+ Img="",
76
+ PARAMETERS={"输入文本": "test_user"}
77
+ )
78
+
79
+ # Keyboard shortcut
80
+ KlController.kl_key_group(
81
+ ActionTitle="Save File",
82
+ WindowName="Notepad",
83
+ Name="",
84
+ ClassName=None,
85
+ ControlType="",
86
+ foundIndex=0,
87
+ AutomationId="",
88
+ Xpath=[],
89
+ Img="",
90
+ PARAMETERS={"组合键": "ctrl+s"}
91
+ )
92
+ ```
93
+
94
+ ### Recording User Actions
95
+
96
+ ```python
97
+ from easyuiauto.record import run_record
98
+
99
+ # Start recording user actions
100
+ run_record(write_file=True)
101
+ # Press ESC to stop recording
102
+ # Generated script will be saved to Record{timestamp}.py
103
+ ```
104
+
105
+ ## Project Structure
106
+
107
+ ```text
108
+ easyuiauto
109
+ ├── .github/
110
+ │ └── workflows/
111
+ │ ├── ci.yml
112
+ │ ├── publish.yml
113
+ │ └── release.yml
114
+ ├── src/
115
+ │ └── easyuiauto/
116
+ │ ├── __init__.py
117
+ │ ├── ctrl.py # Core controller (mouse/keyboard actions)
118
+ │ ├── draw.py # Visual feedback (control highlighting)
119
+ │ ├── record.py # Action recording
120
+ │ └── utils.py # Utility functions (control location, caching)
121
+ ├── tests/
122
+ ├── CHANGELOG.md
123
+ ├── LICENSE
124
+ ├── README.md
125
+ ├── README_CN.md
126
+ └── pyproject.toml
127
+ ```
128
+
129
+ ## Release Automation
130
+
131
+ This repository is prepared for a professional Python package workflow:
132
+
133
+ - **CI** runs lint and tests on push and pull request.
134
+ - **Semantic Release** updates the version, changelog, tag, and GitHub Release.
135
+ - **Trusted Publishing** publishes to PyPI from GitHub Actions without a PyPI API token.
136
+ - **Build artifacts** include both source distribution and wheel.
137
+
138
+ ## Development
139
+
140
+ ```bash
141
+ pip install -e .[dev]
142
+ pytest
143
+ ruff check .
144
+ ```
145
+
146
+ ## Usage Examples
147
+
148
+ For more examples, please refer to the test files in the `test/` directory or check the docstrings in the source code.
149
+
150
+ ## License
151
+
152
+ MIT License. See [LICENSE](LICENSE).
@@ -0,0 +1,116 @@
1
+ [build-system]
2
+ requires = ["setuptools>=80", "wheel"]
3
+ build-backend = "setuptools.build_meta"
4
+
5
+ [project]
6
+ name = "easy_uiauto"
7
+ version = "0.0.1"
8
+ description = "UI automation toolkit based on pyautogui and uiautomation"
9
+ readme = "README.md"
10
+ requires-python = ">=3.11"
11
+ dependencies = [
12
+ "pyautogui>=0.9.54",
13
+ "pynput>=1.8.1",
14
+ "uiautomation>=2.0.29",
15
+ "pyperclip>=1.8.0",
16
+ "build>=1.4.0",
17
+ ]
18
+ keywords = ["auto", "ui", "uiauto", "automation", "gui-testing"]
19
+ authors = [
20
+ {name = "Poggi-Tang", email = "2322806855@qq.com"}
21
+ ]
22
+ classifiers = [
23
+ "Development Status :: 3 - Alpha",
24
+ "Intended Audience :: Developers",
25
+ "License :: OSI Approved :: MIT License",
26
+ "Operating System :: Microsoft :: Windows",
27
+ "Programming Language :: Python :: 3",
28
+ "Programming Language :: Python :: 3.10",
29
+ "Programming Language :: Python :: 3.11",
30
+ "Topic :: Software Development :: Libraries :: Python Modules",
31
+ "Topic :: Software Development :: Testing",
32
+ ]
33
+
34
+ [project.urls]
35
+ Homepage = "https://github.com/Poggi-Tang/easyautomation"
36
+ Repository = "https://github.com/Poggi-Tang/easyautomation.git"
37
+ Issues = "https://github.com/Poggi-Tang/easyautomation/issues"
38
+ Changelog = "https://github.com/Poggi-Tang/easyautomation/blob/master/CHANGELOG.md"
39
+ Documentation = "https://github.com/Poggi-Tang/easyautomation/blob/master/README.md"
40
+
41
+ [project.scripts]
42
+ easyuiauto = "easyuiauto:main"
43
+
44
+ [tool.setuptools]
45
+ package-dir = {"" = "src"}
46
+ include-package-data = true
47
+
48
+ [tool.setuptools.packages.find]
49
+ where = ["src"]
50
+ namespaces = false
51
+
52
+ [tool.pytest.ini_options]
53
+ minversion = "8.0"
54
+ addopts = "-ra --strict-markers --strict-config"
55
+ testpaths = ["test"]
56
+ python_files = ["test_*.py"]
57
+ python_functions = ["test_*"]
58
+
59
+ [tool.ruff]
60
+ line-length = 100
61
+ target-version = "py310"
62
+ src = ["src", "test"]
63
+
64
+ [tool.ruff.lint]
65
+ select = ["E", "F", "I", "B", "UP"]
66
+ ignore = []
67
+
68
+ [tool.coverage.run]
69
+ source = ["src/easyuiauto"]
70
+ branch = true
71
+ omit = ["*/test/*", "*/__pycache__/*"]
72
+
73
+ [tool.coverage.report]
74
+ show_missing = true
75
+ skip_covered = false
76
+ exclude_lines = [
77
+ "pragma: no cover",
78
+ "def __repr__",
79
+ "raise AssertionError",
80
+ "raise NotImplementedError",
81
+ "if __name__ == .__main__.:",
82
+ "if TYPE_CHECKING:",
83
+ ]
84
+
85
+ [tool.semantic_release]
86
+ branch = "master"
87
+ version_toml = ["pyproject.toml:project.version"]
88
+ version_variables = ["src/easyuiauto/__init__.py:__version__"]
89
+ changelog_file = "CHANGELOG.md"
90
+ build_command = "python -m build"
91
+ dist_path = "dist/"
92
+ upload_to_pypi = false
93
+ upload_to_release = true
94
+ commit_message = "chore(release): {version} [skip ci]"
95
+ tag_format = "v{version}"
96
+ commit_parser = "conventional"
97
+ major_on_zero = false
98
+ allow_zero_version = true
99
+
100
+ [tool.semantic_release.remote]
101
+ name = "origin"
102
+
103
+ [tool.semantic_release.publish]
104
+ dist_glob_patterns = ["dist/*"]
105
+
106
+ [tool.mypy]
107
+ python_version = "3.11"
108
+ warn_return_any = true
109
+ warn_unused_configs = true
110
+ ignore_missing_imports = true
111
+ check_untyped_defs = true
112
+
113
+ [tool.isort]
114
+ profile = "black"
115
+ line_length = 100
116
+ known_first_party = ["easyuiauto"]
@@ -0,0 +1,4 @@
1
+ [egg_info]
2
+ tag_build =
3
+ tag_date = 0
4
+
@@ -0,0 +1,78 @@
1
+ # -*- coding: utf-8 -*-
2
+ """easy_uiauto - UI automation toolkit based on pyautogui and uiautomation"""
3
+
4
+ __version__ = "0.0.1"
5
+ __author__ = "Poggi-Tang"
6
+
7
+ from .ctrl import (
8
+ Controller,
9
+ left_click,
10
+ right_click,
11
+ double_click,
12
+ centre_click,
13
+ mouse_left_press,
14
+ mouse_left_release,
15
+ mouse_right_press,
16
+ mouse_right_release,
17
+ mouse_move_pos,
18
+ mouse_move_control,
19
+ drag_control,
20
+ drag_control_by_control,
21
+ set_text,
22
+ input_text,
23
+ key_click,
24
+ key_press,
25
+ key_release,
26
+ key_group,
27
+ activate_window,
28
+ run_action,
29
+ )
30
+
31
+ from .record import run_record, RecordThread
32
+
33
+ from .utils import (
34
+ find_control,
35
+ find_control_by_xpath,
36
+ get_control_info,
37
+ get_control_xpath,
38
+ compile_controls,
39
+ push_message,
40
+ set_top_window,
41
+ auto_scroll,
42
+ )
43
+
44
+ from .draw import ScreenLineBox
45
+
46
+ __all__ = [
47
+ "Controller",
48
+ "left_click",
49
+ "right_click",
50
+ "double_click",
51
+ "centre_click",
52
+ "mouse_left_press",
53
+ "mouse_left_release",
54
+ "mouse_right_press",
55
+ "mouse_right_release",
56
+ "mouse_move_pos",
57
+ "mouse_move_control",
58
+ "drag_control",
59
+ "drag_control_by_control",
60
+ "set_text",
61
+ "input_text",
62
+ "key_click",
63
+ "key_press",
64
+ "key_release",
65
+ "key_group",
66
+ "activate_window",
67
+ "run_action",
68
+ "run_record",
69
+ "RecordThread",
70
+ "find_control",
71
+ "find_control_by_xpath",
72
+ "get_control_info",
73
+ "compile_controls",
74
+ "push_message",
75
+ "set_top_window",
76
+ "auto_scroll",
77
+ "ScreenLineBox",
78
+ ]