pywxauto 1.1.0__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,219 @@
1
+ .idea/
2
+
3
+ website/node_modules
4
+ website/.vitepress
5
+
6
+ # 测试脚本的调试输出
7
+ tests/_bubble_out/
8
+ tests/_moment_media_out/
9
+ classify_debug.png
10
+ # Byte-compiled / optimized / DLL files
11
+ __pycache__/
12
+ *.py[codz]
13
+ *$py.class
14
+
15
+ # C extensions
16
+ *.so
17
+ *.pyd
18
+ *.c
19
+
20
+ # Distribution / packaging
21
+ .Python
22
+ build/
23
+ develop-eggs/
24
+ dist/
25
+ downloads/
26
+ eggs/
27
+ .eggs/
28
+ lib/
29
+ lib64/
30
+ parts/
31
+ sdist/
32
+ var/
33
+ wheels/
34
+ share/python-wheels/
35
+ *.egg-info/
36
+ .installed.cfg
37
+ *.egg
38
+ MANIFEST
39
+
40
+ # PyInstaller
41
+ # Usually these files are written by a python script from a template
42
+ # before PyInstaller builds the exe, so as to inject date/other infos into it.
43
+ *.manifest
44
+ *.spec
45
+
46
+ # Installer logs
47
+ pip-log.txt
48
+ pip-delete-this-directory.txt
49
+
50
+ # Unit test / coverage reports
51
+ htmlcov/
52
+ .tox/
53
+ .nox/
54
+ .coverage
55
+ .coverage.*
56
+ .cache
57
+ nosetests.xml
58
+ coverage.xml
59
+ *.cover
60
+ *.py.cover
61
+ .hypothesis/
62
+ .pytest_cache/
63
+ cover/
64
+
65
+ # Translations
66
+ *.mo
67
+ *.pot
68
+
69
+ # Django stuff:
70
+ *.log
71
+ local_settings.py
72
+ db.sqlite3
73
+ db.sqlite3-journal
74
+
75
+ # Flask stuff:
76
+ instance/
77
+ .webassets-cache
78
+
79
+ # Scrapy stuff:
80
+ .scrapy
81
+
82
+ # Sphinx documentation
83
+ docs/_build/
84
+ docs/apidocs/
85
+
86
+ # PyBuilder
87
+ .pybuilder/
88
+ target/
89
+
90
+ # Jupyter Notebook
91
+ .ipynb_checkpoints
92
+
93
+ # IPython
94
+ profile_default/
95
+ ipython_config.py
96
+
97
+ # pyenv
98
+ # For a library or package, you might want to ignore these files since the code is
99
+ # intended to run in multiple environments; otherwise, check them in:
100
+ # .python-version
101
+
102
+ # pipenv
103
+ # According to pypa/pipenv#598, it is recommended to include Pipfile.lock in version control.
104
+ # However, in case of collaboration, if having platform-specific dependencies or dependencies
105
+ # having no cross-platform support, pipenv may install dependencies that don't work, or not
106
+ # install all needed dependencies.
107
+ #Pipfile.lock
108
+
109
+ # UV
110
+ # Similar to Pipfile.lock, it is generally recommended to include uv.lock in version control.
111
+ # This is especially recommended for binary packages to ensure reproducibility, and is more
112
+ # commonly ignored for libraries.
113
+ #uv.lock
114
+
115
+ # poetry
116
+ # Similar to Pipfile.lock, it is generally recommended to include poetry.lock in version control.
117
+ # This is especially recommended for binary packages to ensure reproducibility, and is more
118
+ # commonly ignored for libraries.
119
+ # https://python-poetry.org/docs/basic-usage/#commit-your-poetrylock-file-to-version-control
120
+ #poetry.lock
121
+ #poetry.toml
122
+
123
+ # pdm
124
+ # Similar to Pipfile.lock, it is generally recommended to include pdm.lock in version control.
125
+ # pdm recommends including project-wide configuration in pdm.toml, but excluding .pdm-python.
126
+ # https://pdm-project.org/en/latest/usage/project/#working-with-version-control
127
+ #pdm.lock
128
+ #pdm.toml
129
+ .pdm-python
130
+ .pdm-build/
131
+
132
+ # pixi
133
+ # Similar to Pipfile.lock, it is generally recommended to include pixi.lock in version control.
134
+ #pixi.lock
135
+ # Pixi creates a virtual environment in the .pixi directory, just like venv module creates one
136
+ # in the .venv directory. It is recommended not to include this directory in version control.
137
+ .pixi
138
+
139
+ # PEP 582; used by e.g. github.com/David-OConnor/pyflow and github.com/pdm-project/pdm
140
+ __pypackages__/
141
+
142
+ # Celery stuff
143
+ celerybeat-schedule
144
+ celerybeat.pid
145
+
146
+ # SageMath parsed files
147
+ *.sage.py
148
+
149
+ # Environments
150
+ .env
151
+ .envrc
152
+ .venv
153
+ env/
154
+ venv/
155
+ ENV/
156
+ env.bak/
157
+ venv.bak/
158
+
159
+ # Spyder project settings
160
+ .spyderproject
161
+ .spyproject
162
+
163
+ # Rope project settings
164
+ .ropeproject
165
+
166
+ # mkdocs documentation
167
+ /site
168
+
169
+ # mypy
170
+ .mypy_cache/
171
+ .dmypy.json
172
+ dmypy.json
173
+
174
+ # Pyre type checker
175
+ .pyre/
176
+
177
+ # pytype static type analyzer
178
+ .pytype/
179
+
180
+ # Cython debug symbols
181
+ cython_debug/
182
+
183
+ # PyCharm
184
+ # JetBrains specific template is maintained in a separate JetBrains.gitignore that can
185
+ # be found at https://github.com/github/gitignore/blob/main/Global/JetBrains.gitignore
186
+ # and can be added to the global gitignore or merged into this file. For a more nuclear
187
+ # option (not recommended) you can uncomment the following to ignore the entire idea folder.
188
+ #.idea/
189
+
190
+ # Abstra
191
+ # Abstra is an AI-powered process automation framework.
192
+ # Ignore directories containing user credentials, local state, and settings.
193
+ # Learn more at https://abstra.io/docs
194
+ .abstra/
195
+
196
+ # Visual Studio Code
197
+ # Visual Studio Code specific template is maintained in a separate VisualStudioCode.gitignore
198
+ # that can be found at https://github.com/github/gitignore/blob/main/Global/VisualStudioCode.gitignore
199
+ # and can be added to the global gitignore or merged into this file. However, if you prefer,
200
+ # you could uncomment the following to ignore the entire vscode folder
201
+ # .vscode/
202
+
203
+ # Ruff stuff:
204
+ .ruff_cache/
205
+
206
+ # PyPI configuration file
207
+ .pypirc
208
+
209
+ # Cursor
210
+ # Cursor is an AI-powered code editor. `.cursorignore` specifies files/directories to
211
+ # exclude from AI features like autocomplete and code analysis. Recommended for sensitive data
212
+ # refer to https://docs.cursor.com/context/ignore-files
213
+ .cursorignore
214
+ .cursorindexingignore
215
+
216
+ # Marimo
217
+ marimo/_static/
218
+ marimo/_lsp/
219
+ __marimo__/
pywxauto-1.1.0/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 miloira
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,72 @@
1
+ Metadata-Version: 2.5
2
+ Name: pywxauto
3
+ Version: 1.1.0
4
+ Summary: 微信 Windows 客户端 UI 自动化封装
5
+ Project-URL: Homepage, https://github.com/miloira/pywxauto
6
+ Author-email: Msky <690126048@qq.com>
7
+ License-Expression: MIT
8
+ License-File: LICENSE
9
+ Classifier: Programming Language :: Python
10
+ Classifier: Programming Language :: Python :: 3
11
+ Classifier: Programming Language :: Python :: 3.8
12
+ Classifier: Programming Language :: Python :: 3.9
13
+ Classifier: Programming Language :: Python :: 3.10
14
+ Classifier: Programming Language :: Python :: 3.11
15
+ Classifier: Programming Language :: Python :: 3.12
16
+ Classifier: Programming Language :: Python :: 3.13
17
+ Classifier: Programming Language :: Python :: 3.14
18
+ Classifier: Programming Language :: Python :: Implementation :: CPython
19
+ Requires-Python: >=3.8
20
+ Requires-Dist: numpy
21
+ Requires-Dist: onnxruntime
22
+ Requires-Dist: opencv-python
23
+ Requires-Dist: pillow
24
+ Requires-Dist: psutil
25
+ Requires-Dist: pyee
26
+ Requires-Dist: pymem
27
+ Requires-Dist: pywin32
28
+ Requires-Dist: rapidocr
29
+ Requires-Dist: requests
30
+ Requires-Dist: sqlcipher3
31
+ Requires-Dist: uiautomation
32
+ Requires-Dist: xmltodict
33
+ Requires-Dist: zstandard
34
+ Description-Content-Type: text/markdown
35
+
36
+ # pywxauto
37
+ 基于 UIAutomation 的微信自动化 Python 库,支持消息发送、聊天监听等功能,适用于机器人开发、自动化办公等场景。
38
+
39
+ ## 构建
40
+
41
+ ### 生成 .pyd 文件(Cython 编译)
42
+
43
+ 将 `pywxauto/wx.py` 编译为 `.pyd` 二进制扩展模块,用于分发时保护源码。
44
+
45
+ **前置条件:**
46
+
47
+ 1. `pip install cython`
48
+ 2. 安装 Microsoft Visual C++ Build Tools(Visual Studio Installer → "使用 C++ 的桌面开发" 工作负载)
49
+
50
+ **生成命令:**
51
+
52
+ ```bash
53
+ python build_pyd.py
54
+ ```
55
+
56
+ 编译后的 `.pyd` 文件会生成在 `pywxauto/` 目录下,如 `pywxauto/wx.cp312-win_amd64.pyd`。
57
+
58
+ ### 生成 .pyi 文件(类型存根)
59
+
60
+ 生成 `.pyi` 类型存根文件,为 IDE 提供代码补全和类型检查支持。
61
+
62
+ **前置条件:**
63
+
64
+ 1. `pip install mypy`
65
+
66
+ **生成命令:**
67
+
68
+ ```bash
69
+ stubgen pywxauto/wx.py -o . --include-docstrings
70
+ ```
71
+
72
+ 生成的 `pywxauto/wx.pyi` 文件包含所有公开类和函数的类型签名及文档字符串。
@@ -0,0 +1,37 @@
1
+ # pywxauto
2
+ 基于 UIAutomation 的微信自动化 Python 库,支持消息发送、聊天监听等功能,适用于机器人开发、自动化办公等场景。
3
+
4
+ ## 构建
5
+
6
+ ### 生成 .pyd 文件(Cython 编译)
7
+
8
+ 将 `pywxauto/wx.py` 编译为 `.pyd` 二进制扩展模块,用于分发时保护源码。
9
+
10
+ **前置条件:**
11
+
12
+ 1. `pip install cython`
13
+ 2. 安装 Microsoft Visual C++ Build Tools(Visual Studio Installer → "使用 C++ 的桌面开发" 工作负载)
14
+
15
+ **生成命令:**
16
+
17
+ ```bash
18
+ python build_pyd.py
19
+ ```
20
+
21
+ 编译后的 `.pyd` 文件会生成在 `pywxauto/` 目录下,如 `pywxauto/wx.cp312-win_amd64.pyd`。
22
+
23
+ ### 生成 .pyi 文件(类型存根)
24
+
25
+ 生成 `.pyi` 类型存根文件,为 IDE 提供代码补全和类型检查支持。
26
+
27
+ **前置条件:**
28
+
29
+ 1. `pip install mypy`
30
+
31
+ **生成命令:**
32
+
33
+ ```bash
34
+ stubgen pywxauto/wx.py -o . --include-docstrings
35
+ ```
36
+
37
+ 生成的 `pywxauto/wx.pyi` 文件包含所有公开类和函数的类型签名及文档字符串。
@@ -0,0 +1,58 @@
1
+ [build-system]
2
+ requires = ["hatchling"]
3
+ build-backend = "hatchling.build"
4
+
5
+ [project]
6
+ name = "pywxauto"
7
+ version = "1.1.0"
8
+ description = "微信 Windows 客户端 UI 自动化封装"
9
+ requires-python = ">=3.8"
10
+ license = "MIT"
11
+ authors = [
12
+ { name = "Msky", email = "690126048@qq.com" },
13
+ ]
14
+ readme = "README.md"
15
+ classifiers = [
16
+ "Programming Language :: Python",
17
+ "Programming Language :: Python :: 3",
18
+ "Programming Language :: Python :: 3.8",
19
+ "Programming Language :: Python :: 3.9",
20
+ "Programming Language :: Python :: 3.10",
21
+ "Programming Language :: Python :: 3.11",
22
+ "Programming Language :: Python :: 3.12",
23
+ "Programming Language :: Python :: 3.13",
24
+ "Programming Language :: Python :: 3.14",
25
+ "Programming Language :: Python :: Implementation :: CPython",
26
+ ]
27
+ dependencies = [
28
+ "psutil",
29
+ "requests",
30
+ "uiautomation",
31
+ "pywin32",
32
+ "Pillow",
33
+ "numpy",
34
+ "opencv-python",
35
+ "pyee",
36
+ "rapidocr",
37
+ "onnxruntime",
38
+ "pymem",
39
+ "sqlcipher3",
40
+ "zstandard",
41
+ "xmltodict",
42
+ ]
43
+
44
+ [project.urls]
45
+ Homepage = "https://github.com/miloira/pywxauto"
46
+
47
+ [project.scripts]
48
+ pywxauto = "pywxauto.cli:main"
49
+
50
+ [tool.hatch.build.targets.wheel]
51
+ packages = ["pywxauto"]
52
+ artifacts = ["pywxauto/*.pyd"]
53
+ exclude = ["pywxauto/wx.py", "pywxauto/wx.c"]
54
+
55
+ [tool.hatch.build.targets.sdist]
56
+ only-include = ["pywxauto/", "pyproject.toml", "README.md", "LICENSE"]
57
+ exclude = ["pywxauto/wx.py", "pywxauto/wx.c"]
58
+ artifacts = ["pywxauto/*.pyd"]
@@ -0,0 +1,13 @@
1
+ """
2
+ pywxauto - 微信自动化库
3
+
4
+ 用法:
5
+ from pywxauto import Weixin, WeixinManager, Event, Chat, SeparateChat
6
+
7
+ # 也可以从子模块精确导入
8
+ from pywxauto.wx import TextMessage, ImageMessage, Event
9
+ from pywxauto.wx import SendError, OCRError
10
+ """
11
+ __version__ = "1.1.0"
12
+
13
+ from pywxauto.wx import *
@@ -0,0 +1,18 @@
1
+ """
2
+ pywxauto CLI 入口
3
+
4
+ 用法:
5
+ pywxauto -k 检查当前授权状态
6
+ pywxauto -a <LICENSE> 使用授权码激活当前设备
7
+ pywxauto -d 清除本地授权信息
8
+ pywxauto -f 显示当前设备指纹
9
+ """
10
+
11
+
12
+ def main():
13
+ from pywxauto.wx import _license_cli_main
14
+ _license_cli_main()
15
+
16
+
17
+ if __name__ == "__main__":
18
+ main()
Binary file