iclick-auto
English | 中文
用于iOS免越狱自动化的 Python SDK。除了 API 调用功能外,实现了断线重连和事件监听机制以及二进制meta数据包解析。
官方网站: https://iosclick.com/
安装
pip install iclick-auto
快速开始
from iclick import client as iclient
# 创建客户端实例
client = iclient()
# 监听设备事件
client.on('device:online', lambda data: print('设备上线:', data))
client.on('device:offline', lambda data: print('设备下线:', data))
# 连接服务器
client.connect()
# 调用 API
result = client.invoke('getDevices', {'deviceId': 'P60904DC8D3F'})
print('结果:', result)
API 文档
client(options)
创建客户端实例。
参数:
| 参数 | 类型 | 可选 | 说明 | 默认值 |
|---|---|---|---|---|
options.host |
str | 是 | WebSocket 服务器地址 | 127.0.0.1 |
options.port |
int | 是 | WebSocket 服务器端口 | 23188 |
options.autoReconnect |
bool | 是 | 是否启用自动重连 | True |
options.reconnectDelay |
int | 是 | 重连延迟(秒) | 3 |
options.maxReconnectAttempts |
int | 是 | 最大重连次数,0表示无限 | 8 |
示例:
from iclick import client as iclient
client = iclient({
'host': '192.168.31.15',
'port': 23188,
'autoReconnect': True,
'reconnectDelay': 5
})
client.connect()
连接到 WebSocket 服务器。
示例:
try:
client.connect()
print('连接成功')
except Exception as error:
print('连接失败:', error)
client.invoke(type, params, timeout)
调用 API 方法。
参数:
type(str): API 类型params(dict, 可选): 请求参数,默认{}timeout(int, 可选): 超时时间(秒),默认18
返回: 响应数据
示例:
# 发送按键
result = client.invoke('sendKey', {
'deviceId': 'P60904DC8D3F',
'key': 'h',
'fnkey': 'COMMAND'
})
# 自定义超时时间
result = client.invoke('someType', {'param': 'value'}, 30)
client.on(event_name, callback)
注册事件监听器。
参数:
event_name(str): 事件名称callback(callable): 回调函数,接收事件数据作为参数
示例:
client.on('device:online', lambda data: print('设备上线:', data))
client.on('device:offline', lambda data: print('设备下线:', data))
client.off(event_name, callback)
移除事件监听器。
参数:
event_name(str): 事件名称callback(callable, 可选): 要移除的回调函数。如果不提供,将移除该事件的所有监听器
示例:
def handler(data):
print('收到事件:', data)
# 注册监听器
client.on('someEvent', handler)
# 移除特定监听器
client.off('someEvent', handler)
# 移除事件的所有监听器
client.off('someEvent')
client.destroy()
销毁客户端,断开连接并清理所有资源。
示例:
client.destroy()
print('客户端已销毁')
License
MIT
相关链接
- API参考: https://iosclick.com/zh/api/index.html
- 事件通知: https://iosclick.com/zh/api/notify.html
- PyPI 包: https://pypi.org/project/iclick-auto/
问题反馈
如有问题,请在 Issues 中反馈。
Metadata
Release files for iclick-auto 1.0.1
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 |
|---|---|---|---|---|
| iclick_auto-1.0.1.tar.gz | 6.9 kB | With provenance | Details for iclick_auto-1.0.1.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| iclick_auto-1.0.1-py3-none-any.whl | Python 3 | none | any | Details for iclick_auto-1.0.1-py3-none-any.whl |
Total release size: 14.0 kB
Release files / iclick_auto-1.0.1.tar.gz
| Download URL | iclick_auto-1.0.1.tar.gz |
|---|---|
| Size | 6.9 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
0b7af446c19a92c839e19f48e76abf01e42bc7b807050db842951511712964bd
|
|
BLAKE2b-256 checksum How to use checksums |
5df2dce812854530299a229e80a84feb1641be638a8513ccd6ac96408ff138cc
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.7
|
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.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Dec 19, 2025.
Transparency logRelease files / iclick_auto-1.0.1-py3-none-any.whl
| Download URL | iclick_auto-1.0.1-py3-none-any.whl |
|---|---|
| Size | 7.1 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
2ab80db15a3fe2d9b2bde4ab72b9e4794c498cb7d39653d59ef6848fb6372a45
|
|
BLAKE2b-256 checksum How to use checksums |
26e9b35c07775edbf7ed49e75a235a0744f64a52ab98a22fcbbf80f527bfe4ff
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.7
|
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.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Dec 19, 2025.
Transparency logSecurity for iclick-auto 1.0.1
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.
Full provenance
All 2 files in this release have been uploaded with provenance metadata.
Attestation for iclick_auto-1.0.1.tar.gz
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Dec 19, 2025.
Transparency logA 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.