minidevice


Nameminidevice JSON
Version 3.0.1 PyPI version JSON
download
home_pagehttps://github.com/NakanoSanku/minidevice
SummaryAndroid Auto Pypi
upload_time2024-01-28 07:44:31
maintainer
docs_urlNone
authorKateTseng
requires_python>=3
licenseMIT
keywords android
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # minidevice
一个对安卓设备(主要是安卓模拟器)进行基础操作的工具包
## 项目结构
- **Root Directory**
  - `README.md`
  - `main.py`
  - `requirements.txt`
  - `setup.py`

- **minidevice/**
  - `__init__.py`
  - `DroidCast.py`
  - `QueueUtils.py`
  - `adbcap.py`
  - `adbtouch.py`
  - `device.py`
  - `logger.py`
  - `minicap.py`
  - `minitouch.py`
  - `maatouch.py`
  - `screencap.py`
  - `config.py`
  - `utils.py`
  - `touch.py`
  - **bin/**
    - `DroidCast-debug-1.1.1.apk`
    - **minicap/jni/**
      - *Various `minicap.so` files for different Android versions and architectures*
    - **minicap/libs/**
      - *Various `minicap` binaries for different architectures*
    - **minitouch/libs/**
      - *Various `minitouch` binaries for different architectures*
    - `maatouch`

- **tests/**
  - `test_minidevice.py`

## 更新日志
### 2024.1.26
更新为3.0版本
移除pyminitouch依赖,解决minitouch触控方式部分设备旋转屏幕方向后无法使用的问题,加入MaaTouch触控方式,修改部分不符合命名规范的类
ADBtouch -> ADBTouch
ADBcap -> ADBCap
Minicap -> MiniCap
Minitouch -> MiniTouch
adbutils 依赖解除版本限制
> minitouch无法在安卓13上使用,请使用MaaTouch替代
### 2023.12.3 
屏蔽pyminitouch的日志并在MiniDevice中添加部分日志以及引入tests自动化测试Minidevice相关实例是否正常(测试不代表所有情况) 尝试修复部分bug
### 2023.12.2
README说明,添加[MiniDevice](./minidevice/device.py)类
### 2023.8.10 
移除opencv库的引用,让用户自行处理截图源数据bytes,以此减少库依赖(opencv,numpy库真的很大且并非所有人都需要)
## requirements
[`pyminitouch`](https://github.com/williamfzc/pyminitouch) `adbutils==1.2.9`
## 安装
`pip install minidevice`
## API文档以及使用说明
大致设计思路就是通过实现`ScreenCap`和`Touch`这两个抽象基类
1. ScreenCap 
- @abstractmethod screencap_raw 返回截图bytes数据
- save_screencap(path) 保存截图到path 
2. Touch
- @abstractmethod click(x,y,duration) 
- @abstractmethod swipe(points,duraiton)

整合至MiniDevice类创建对安卓设备操作的对象,引入基础操作锁,防止不合理并发导致的程序错误
```
MiniDevice(self, serial=None, capMethod: Union[ADBtouch, Minicap , DroidCast] = None,
                 touchMethod: Union[ADBtouch,Minitouch] = None, screenshotTimeout=500)
```
`capMethod`|`touchMethod` 为 `ScreenCap` | `Touch` 的**子类或者子类实例**,为None时不创建对应方法

当`capMethod`|`touchMethod`包含子类时,`serial`为必须
 - screenshot_raw
 - click
 - swipe
> User无需关心具体实现过程,Developer直接继承基类即可添加新方法

### 已实现的特性
[![minidevice设计架构图.png](https://s2.loli.net/2023/12/03/Zje6Bh3TUDxbP2W.png)](https://www.iodraw.com/diagram/?lightbox=1&highlight=0000ff&edit=_blank&layers=1&nav=1&title=%E6%9C%AA%E5%91%BD%E5%90%8D%E7%BB%98%E5%9B%BE.iodraw#R7V1bd5s4EP41nNN9SA73y6PBdveS7KZNdtvuS48Ciq0NRl5ZTuL%2B%2BpUw2BARGxwT8EY%2BfUCDENXMp5lP0ogoRjB7%2BkjAfHqJIxgruho9KcZQ0XXN1HWF%2F1Oj1VriGPZaMCEoyiptBdfoB8yEaiZdogguShUpxjFF87IwxEkCQ1qSAULwY7naHY7Lb52DCRQE1yGIRekXFNHpWurqzlb%2BM0STaf5mzfbWd2Ygr5z1ZDEFEX4siIyRYgQEY7q%2Bmj0FMObKy%2FXy5ZfVl%2Fji3v7466fFv%2BBP%2F7eb3%2F86Wzc2bvLIpgsEJvTgpj9NV%2FO%2FncgjtmMNPz%2BG35BzdWZk1n0A8TJTmDKyFddVBgNlZCmer%2FgjZeQovqb4fqYHusqVu3hEsxgkrORP6SxmQo1dLiggNEMC0xS7hwn6gRMK8hrhFMXRBVj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ryHAtvHyK2thkdr6Kj4cDUtrJVxiNQ%2F5CEB8VpAWHrXgLDFOVG4OVvOut7gry5IOLwWDvlJx%2B7g4FZsvKXHiRdTTG%2FQDKZkYVAFC4tjwrd5IPHHijeW%2BDg6PjYHXDv0F%2FLwTasWNmoyyNbWy%2B0K%2FrjxAMoRPpB4suO64nhFk1M3B6Gh84DgiNtjLx7HeocgaHr06hAQ2J07%2FXyBZff2CaJMZ%2B8TBk2PWh0CA6%2Fu2kJzGLDi9u%2FFrdfDt391zxj9Bw%3D%3D)
- ScreenCap
    - MiniCap
    - ADBCap
    - DroidCast
- Touch
    - MiniTouch
    - ADBTouch
    - MaaTouch
- MiniDevice
  - ScreenCap
  - Touch
## 已知bug
- [x] ~~转发端口清理失败~~ (暂时无需清理,所有转发时都会判断端口是否被占用)
- [ ] pyminitouch库使用系统路径的adb,导致需用户自行安装adb工具并添加到环境变量中
- [ ] pyminitouch库实现存在潜在问题,主要集中在[~~连接问题~~](a1802889f30ad19db2ef12b391eff3c86b2285ea)以及输入是否合法未进行检查上面
### Tests
进行测试前请`pip install pytest`

相关使用特性见[pytest](https://pytest.org) 文档

[MiniDevice测试](tests/test_minidevice.py)

修改文件中以下参数以适配不同测试环境以及新方法
```python
SERIAL = "emulator-5554"  # 设备ID
SCREENSHOT_TIMEOUT = 500  # 截图延迟 单位ms
METHOD_LIST = [
    # 格式为 (ScreenCap,Touch)
    # 截图方法
    (Minicap, None),
    (DroidCast, None),
    (ADBcap, None),
    # 操作方法
    (None, ADBtouch),
    (None, Minitouch)
]
```
## 性能排序
### 截图
Minicap>>DroidCast>>ADBcap

- Minicap截取一张图片时间大概`20~30ms`,当然你可以通过添加参数rate,以获得更加高的速度(但这同时会拉高设备CPU占用)
- DroidCast截图图片时间大概在`100ms`以内,场景越复杂,时间越长,解决方法未知
- ADBcap耗时`500ms`甚至更长,稳定性未知

### 触控
Minitouch>>ADBtouch
- Minitouch触控效率据说和Windows api几乎相同
- ADBtouch无法模拟曲线滑动,只能点到点直线

            

Raw data

            {
    "_id": null,
    "home_page": "https://github.com/NakanoSanku/minidevice",
    "name": "minidevice",
    "maintainer": "",
    "docs_url": null,
    "requires_python": ">=3",
    "maintainer_email": "",
    "keywords": "Android",
    "author": "KateTseng",
    "author_email": "Kate.TsengK@outlook.com",
    "download_url": "https://files.pythonhosted.org/packages/62/97/52bdee602553c186cdaf7b8a5fb852b1108ce3d824008b8a3f5d13cbced0/minidevice-3.0.1.tar.gz",
    "platform": null,
    "description": "# minidevice\r\n\u4e00\u4e2a\u5bf9\u5b89\u5353\u8bbe\u5907(\u4e3b\u8981\u662f\u5b89\u5353\u6a21\u62df\u5668)\u8fdb\u884c\u57fa\u7840\u64cd\u4f5c\u7684\u5de5\u5177\u5305\r\n## \u9879\u76ee\u7ed3\u6784\r\n- **Root Directory**\r\n  - `README.md`\r\n  - `main.py`\r\n  - `requirements.txt`\r\n  - `setup.py`\r\n\r\n- **minidevice/**\r\n  - `__init__.py`\r\n  - `DroidCast.py`\r\n  - `QueueUtils.py`\r\n  - `adbcap.py`\r\n  - `adbtouch.py`\r\n  - `device.py`\r\n  - `logger.py`\r\n  - `minicap.py`\r\n  - `minitouch.py`\r\n  - `maatouch.py`\r\n  - `screencap.py`\r\n  - `config.py`\r\n  - `utils.py`\r\n  - `touch.py`\r\n  - **bin/**\r\n    - `DroidCast-debug-1.1.1.apk`\r\n    - **minicap/jni/**\r\n      - *Various `minicap.so` files for different Android versions and architectures*\r\n    - **minicap/libs/**\r\n      - *Various `minicap` binaries for different architectures*\r\n    - **minitouch/libs/**\r\n      - *Various `minitouch` binaries for different architectures*\r\n    - `maatouch`\r\n\r\n- **tests/**\r\n  - `test_minidevice.py`\r\n\r\n## \u66f4\u65b0\u65e5\u5fd7\r\n### 2024.1.26\r\n\u66f4\u65b0\u4e3a3.0\u7248\u672c\r\n\u79fb\u9664pyminitouch\u4f9d\u8d56\uff0c\u89e3\u51b3minitouch\u89e6\u63a7\u65b9\u5f0f\u90e8\u5206\u8bbe\u5907\u65cb\u8f6c\u5c4f\u5e55\u65b9\u5411\u540e\u65e0\u6cd5\u4f7f\u7528\u7684\u95ee\u9898\uff0c\u52a0\u5165MaaTouch\u89e6\u63a7\u65b9\u5f0f\uff0c\u4fee\u6539\u90e8\u5206\u4e0d\u7b26\u5408\u547d\u540d\u89c4\u8303\u7684\u7c7b\r\nADBtouch -> ADBTouch\r\nADBcap -> ADBCap\r\nMinicap -> MiniCap\r\nMinitouch -> MiniTouch\r\nadbutils \u4f9d\u8d56\u89e3\u9664\u7248\u672c\u9650\u5236\r\n> minitouch\u65e0\u6cd5\u5728\u5b89\u535313\u4e0a\u4f7f\u7528\uff0c\u8bf7\u4f7f\u7528MaaTouch\u66ff\u4ee3\r\n### 2023.12.3 \r\n\u5c4f\u853dpyminitouch\u7684\u65e5\u5fd7\u5e76\u5728MiniDevice\u4e2d\u6dfb\u52a0\u90e8\u5206\u65e5\u5fd7\u4ee5\u53ca\u5f15\u5165tests\u81ea\u52a8\u5316\u6d4b\u8bd5Minidevice\u76f8\u5173\u5b9e\u4f8b\u662f\u5426\u6b63\u5e38(\u6d4b\u8bd5\u4e0d\u4ee3\u8868\u6240\u6709\u60c5\u51b5) \u5c1d\u8bd5\u4fee\u590d\u90e8\u5206bug\r\n### 2023.12.2\r\nREADME\u8bf4\u660e,\u6dfb\u52a0[MiniDevice](./minidevice/device.py)\u7c7b\r\n### 2023.8.10 \r\n\u79fb\u9664opencv\u5e93\u7684\u5f15\u7528\uff0c\u8ba9\u7528\u6237\u81ea\u884c\u5904\u7406\u622a\u56fe\u6e90\u6570\u636ebytes,\u4ee5\u6b64\u51cf\u5c11\u5e93\u4f9d\u8d56(opencv\uff0cnumpy\u5e93\u771f\u7684\u5f88\u5927\u4e14\u5e76\u975e\u6240\u6709\u4eba\u90fd\u9700\u8981)\r\n## requirements\r\n[`pyminitouch`](https://github.com/williamfzc/pyminitouch) `adbutils==1.2.9`\r\n## \u5b89\u88c5\r\n`pip install minidevice`\r\n## API\u6587\u6863\u4ee5\u53ca\u4f7f\u7528\u8bf4\u660e\r\n\u5927\u81f4\u8bbe\u8ba1\u601d\u8def\u5c31\u662f\u901a\u8fc7\u5b9e\u73b0`ScreenCap`\u548c`Touch`\u8fd9\u4e24\u4e2a\u62bd\u8c61\u57fa\u7c7b\r\n1. ScreenCap \r\n- @abstractmethod screencap_raw \u8fd4\u56de\u622a\u56febytes\u6570\u636e\r\n- save_screencap(path) \u4fdd\u5b58\u622a\u56fe\u5230path \r\n2. Touch\r\n- @abstractmethod click(x,y,duration) \r\n- @abstractmethod swipe(points,duraiton)\r\n\r\n\u6574\u5408\u81f3MiniDevice\u7c7b\u521b\u5efa\u5bf9\u5b89\u5353\u8bbe\u5907\u64cd\u4f5c\u7684\u5bf9\u8c61,\u5f15\u5165\u57fa\u7840\u64cd\u4f5c\u9501\uff0c\u9632\u6b62\u4e0d\u5408\u7406\u5e76\u53d1\u5bfc\u81f4\u7684\u7a0b\u5e8f\u9519\u8bef\r\n```\r\nMiniDevice(self, serial=None, capMethod: Union[ADBtouch, Minicap , DroidCast] = None,\r\n                 touchMethod: Union[ADBtouch,Minitouch] = None, screenshotTimeout=500)\r\n```\r\n`capMethod`|`touchMethod` \u4e3a `ScreenCap` | `Touch` \u7684**\u5b50\u7c7b\u6216\u8005\u5b50\u7c7b\u5b9e\u4f8b**\uff0c\u4e3aNone\u65f6\u4e0d\u521b\u5efa\u5bf9\u5e94\u65b9\u6cd5\r\n\r\n\u5f53`capMethod`|`touchMethod`\u5305\u542b\u5b50\u7c7b\u65f6\uff0c`serial`\u4e3a\u5fc5\u987b\r\n - screenshot_raw\r\n - click\r\n - swipe\r\n> User\u65e0\u9700\u5173\u5fc3\u5177\u4f53\u5b9e\u73b0\u8fc7\u7a0b\uff0cDeveloper\u76f4\u63a5\u7ee7\u627f\u57fa\u7c7b\u5373\u53ef\u6dfb\u52a0\u65b0\u65b9\u6cd5\r\n\r\n### \u5df2\u5b9e\u73b0\u7684\u7279\u6027\r\n[![minidevice\u8bbe\u8ba1\u67b6\u6784\u56fe.png](https://s2.loli.net/2023/12/03/Zje6Bh3TUDxbP2W.png)](https://www.iodraw.com/diagram/?lightbox=1&highlight=0000ff&edit=_blank&layers=1&nav=1&title=%E6%9C%AA%E5%91%BD%E5%90%8D%E7%BB%98%E5%9B%BE.iodraw#R7V1bd5s4EP41nNN9SA73y6PBdveS7KZNdtvuS48Ciq0NRl5ZTuL%2B%2BpUw2BARGxwT8EY%2BfUCDENXMp5lP0ogoRjB7%2BkjAfHqJIxgruho9KcZQ0XXN1HWF%2F1Oj1VriGPZaMCEoyiptBdfoB8yEaiZdogguShUpxjFF87IwxEkCQ1qSAULwY7naHY7Lb52DCRQE1yGIRekXFNHpWurqzlb%2BM0STaf5mzfbWd2Ygr5z1ZDEFEX4siIyRYgQEY7q%2Bmj0FMObKy%2FXy5ZfVl%2Fji3v7466fFv%2BBP%2F7eb3%2F86Wzc2bvLIpgsEJvTgpj9NV%2FO%2FncgjtmMNPz%2BG35BzdWZk1n0A8TJTmDKyFddVBgNlZCmer%2FgjZeQovqb4fqYHusqVu3hEsxgkrORP6SxmQo1dLiggNEMC0xS7hwn6gRMK8hrhFMXRBVjhJe8PJRDmhULdGyZmd3kDBC7QD3Ab5%2BWQV0AJJDerOcxaYOIY3MLYB%2BH9hOBlEgU4xiT9jxqqOmY%2FVqWmKjOVP0BC4VMBSJlqP0I8g5SsWJXsLnvF%2BpFsmOhuVn7cgk7TzUw4LSBOt7IBBTKkTzaNb973mY0MkExY%2F5u90K56n1p%2BHYgpJAmg0Oc6WxQxxC4Kfd2KUmQ1QJnjCii7DpnJkgDMd2Hqjpn5OrvDYQNiNEnYdciMB5llfW4fxMb6ILtB8VxAF0NjeF8Bryqw2qUa1%2FzJIgLhVY4b7ZnoEjyVKl6ABd1gNY7BfIFuN92YATJBiY8pxbOsUg3kFgaYCOLdg7s2ik3XKoHKFDGlOxWYcndAuASmxsjxRP%2F0HDAxSsGyoATfb3w8V9MdiuNckwlOK%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lac09dMrjdrm7smMxhEnNGGMwvsPT4zls%2BaDaEkAV91PrJJMtl7TnSBolGzdGBSdz23yWFic5j6iOfyQaVXCQoRFELxIbY4Ei85TsTX1pPbx8%2BC7f8pr1Jw1aOrRF9hfaRBx3sCzsamkdT2jdYfmY7dG6zRN7oo3WJ88vW1xTdwWf4nZybS7djDQOY%2FTtAZETqKgHRR0T9t0cQo%2FGPqSJPSNJBycpt8eS9DF9QHJEvaOs9NhCbq4iSlZwttioHuWoIvTeskS3hgFPWAJJ3XQvoXFndxoreUznHp6pCEuGaTpkekuokyQ7B2fPPgsRnt80pCfAagfRTbj7XT4ZMWnBCWffFsMdM8nDTHRRPLJN0ZB93zSEA9TvC8%2BmRut7fxYzbJKCbFOOegf6Qiwoan9Spc1u0BTi%2Bmyd24Iw1DweuzOrWuZllqJ5delyzpaTSznxu3Lvnf%2BNcD%2BG59Ziqy%2BFguFp3hx%2B1haappjDaB7VwkaO3ThbfWnAV8JGr0maPIsor6AxhZpCU%2BWGMIHxHosJ671Jq4vAXNnyD1Ocvezb1CYqshxNLeK42itkRy34kAYJIibdaCMXGUwSj%2BdbikDU3EdntPP2C6%2FYLfGCnua3XLHiu9ICryHAtvHyK2thkdr6Kj4cDUtrJVxiNQ%2F5CEB8VpAWHrXgLDFOVG4OVvOut7gry5IOLwWDvlJx%2B7g4FZsvKXHiRdTTG%2FQDKZkYVAFC4tjwrd5IPHHijeW%2BDg6PjYHXDv0F%2FLwTasWNmoyyNbWy%2B0K%2FrjxAMoRPpB4suO64nhFk1M3B6Gh84DgiNtjLx7HeocgaHr06hAQ2J07%2FXyBZff2CaJMZ%2B8TBk2PWh0CA6%2Fu2kJzGLDi9u%2FFrdfDt391zxj9Bw%3D%3D)\r\n- ScreenCap\r\n    - MiniCap\r\n    - ADBCap\r\n    - DroidCast\r\n- Touch\r\n    - MiniTouch\r\n    - ADBTouch\r\n    - MaaTouch\r\n- MiniDevice\r\n  - ScreenCap\r\n  - Touch\r\n## \u5df2\u77e5bug\r\n- [x] ~~\u8f6c\u53d1\u7aef\u53e3\u6e05\u7406\u5931\u8d25~~ (\u6682\u65f6\u65e0\u9700\u6e05\u7406,\u6240\u6709\u8f6c\u53d1\u65f6\u90fd\u4f1a\u5224\u65ad\u7aef\u53e3\u662f\u5426\u88ab\u5360\u7528)\r\n- [ ] pyminitouch\u5e93\u4f7f\u7528\u7cfb\u7edf\u8def\u5f84\u7684adb\uff0c\u5bfc\u81f4\u9700\u7528\u6237\u81ea\u884c\u5b89\u88c5adb\u5de5\u5177\u5e76\u6dfb\u52a0\u5230\u73af\u5883\u53d8\u91cf\u4e2d\r\n- [ ] pyminitouch\u5e93\u5b9e\u73b0\u5b58\u5728\u6f5c\u5728\u95ee\u9898\uff0c\u4e3b\u8981\u96c6\u4e2d\u5728[~~\u8fde\u63a5\u95ee\u9898~~](a1802889f30ad19db2ef12b391eff3c86b2285ea)\u4ee5\u53ca\u8f93\u5165\u662f\u5426\u5408\u6cd5\u672a\u8fdb\u884c\u68c0\u67e5\u4e0a\u9762\r\n### Tests\r\n\u8fdb\u884c\u6d4b\u8bd5\u524d\u8bf7`pip install pytest`\r\n\r\n\u76f8\u5173\u4f7f\u7528\u7279\u6027\u89c1[pytest](https://pytest.org) \u6587\u6863\r\n\r\n[MiniDevice\u6d4b\u8bd5](tests/test_minidevice.py)\r\n\r\n\u4fee\u6539\u6587\u4ef6\u4e2d\u4ee5\u4e0b\u53c2\u6570\u4ee5\u9002\u914d\u4e0d\u540c\u6d4b\u8bd5\u73af\u5883\u4ee5\u53ca\u65b0\u65b9\u6cd5\r\n```python\r\nSERIAL = \"emulator-5554\"  # \u8bbe\u5907ID\r\nSCREENSHOT_TIMEOUT = 500  # \u622a\u56fe\u5ef6\u8fdf \u5355\u4f4dms\r\nMETHOD_LIST = [\r\n    # \u683c\u5f0f\u4e3a (ScreenCap,Touch)\r\n    # \u622a\u56fe\u65b9\u6cd5\r\n    (Minicap, None),\r\n    (DroidCast, None),\r\n    (ADBcap, None),\r\n    # \u64cd\u4f5c\u65b9\u6cd5\r\n    (None, ADBtouch),\r\n    (None, Minitouch)\r\n]\r\n```\r\n## \u6027\u80fd\u6392\u5e8f\r\n### \u622a\u56fe\r\nMinicap>>DroidCast>>ADBcap\r\n\r\n- Minicap\u622a\u53d6\u4e00\u5f20\u56fe\u7247\u65f6\u95f4\u5927\u6982`20~30ms`,\u5f53\u7136\u4f60\u53ef\u4ee5\u901a\u8fc7\u6dfb\u52a0\u53c2\u6570rate\uff0c\u4ee5\u83b7\u5f97\u66f4\u52a0\u9ad8\u7684\u901f\u5ea6(\u4f46\u8fd9\u540c\u65f6\u4f1a\u62c9\u9ad8\u8bbe\u5907CPU\u5360\u7528)\r\n- DroidCast\u622a\u56fe\u56fe\u7247\u65f6\u95f4\u5927\u6982\u5728`100ms`\u4ee5\u5185\uff0c\u573a\u666f\u8d8a\u590d\u6742,\u65f6\u95f4\u8d8a\u957f,\u89e3\u51b3\u65b9\u6cd5\u672a\u77e5\r\n- ADBcap\u8017\u65f6`500ms`\u751a\u81f3\u66f4\u957f,\u7a33\u5b9a\u6027\u672a\u77e5\r\n\r\n### \u89e6\u63a7\r\nMinitouch>>ADBtouch\r\n- Minitouch\u89e6\u63a7\u6548\u7387\u636e\u8bf4\u548cWindows api\u51e0\u4e4e\u76f8\u540c\r\n- ADBtouch\u65e0\u6cd5\u6a21\u62df\u66f2\u7ebf\u6ed1\u52a8,\u53ea\u80fd\u70b9\u5230\u70b9\u76f4\u7ebf\r\n",
    "bugtrack_url": null,
    "license": "MIT",
    "summary": "Android Auto Pypi",
    "version": "3.0.1",
    "project_urls": {
        "Homepage": "https://github.com/NakanoSanku/minidevice"
    },
    "split_keywords": [
        "android"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "8a49d65c9761a658fd37df4761ca6edd51c56f87aa563aedf74dbe707c8c75ac",
                "md5": "c72e38d7566c2582df5c22db61ac1cd5",
                "sha256": "239646e0e45800c167f4c0bf51ec48caa05b06124ece3ac69229e7c04b45a4ae"
            },
            "downloads": -1,
            "filename": "minidevice-3.0.1-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "c72e38d7566c2582df5c22db61ac1cd5",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3",
            "size": 5018502,
            "upload_time": "2024-01-28T07:44:29",
            "upload_time_iso_8601": "2024-01-28T07:44:29.023222Z",
            "url": "https://files.pythonhosted.org/packages/8a/49/d65c9761a658fd37df4761ca6edd51c56f87aa563aedf74dbe707c8c75ac/minidevice-3.0.1-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "629752bdee602553c186cdaf7b8a5fb852b1108ce3d824008b8a3f5d13cbced0",
                "md5": "ccccec0d12750544c49fc0419952d9dd",
                "sha256": "812bf6faf0292936b4542382d2f0b46407f9b20095e77c9f843eef269039223d"
            },
            "downloads": -1,
            "filename": "minidevice-3.0.1.tar.gz",
            "has_sig": false,
            "md5_digest": "ccccec0d12750544c49fc0419952d9dd",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3",
            "size": 22350,
            "upload_time": "2024-01-28T07:44:31",
            "upload_time_iso_8601": "2024-01-28T07:44:31.553097Z",
            "url": "https://files.pythonhosted.org/packages/62/97/52bdee602553c186cdaf7b8a5fb852b1108ce3d824008b8a3f5d13cbced0/minidevice-3.0.1.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-01-28 07:44:31",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "NakanoSanku",
    "github_project": "minidevice",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": false,
    "requirements": [],
    "lcname": "minidevice"
}
        
Elapsed time: 0.67437s