Plyer平台无关的 Python 封装器
Plyer 是一个平台无关的 Python 封装器,封装了一些平台独立的 API。Plyer 并非要重复造轮子,而是将一些平台的差异通过简单的 API 进行封装。
-
on python-for-android, pyjnius is used
-
on kivy-ios, pyobjus is used
-
on windows/mac/linux, commonly found libraries and programs will be used
示例代码:
from plyer.vibrator import vibrate vibrate(10) # in Plyer, the argument is in seconds
Support
Platform | Android < 4.0 | Android > 4.0 | iOS | Windows | OSX | Linux |
---|---|---|---|---|---|---|
Accelerometer | X | X | X | X | X | |
Camera (taking picture) | X | X | ||||
GPS | X | X | X | |||
Notifications | X | X | X | X | X | |
Text to speech | X | X | X | X | X | X |
Email (open mail client) | X | X | X | X | X | |
Vibrator | X | X | ||||
Sms (send messages) | X | X | ||||
Compass | X | X | X | |||
Unique ID (IMEI or SN) | X | X | X | X | X | X |
Gyroscope | X | X | X | |||
Battery | X | X | X | X | X | X |
Native file chooser | X | X | X |
评论
TWRChartsChartJS 的 iOS 封装器
TWRCharts是ChartJS的iOS封装器,方便利用本机的Obj-C代码构建动态的图表。
TWRChartsChartJS 的 iOS 封装器
0
Dexie.jsindexedDB 封装器
Dexie.js是indexedDB封装器。简洁直观的API,方便使用友好的代码完成适应人类阅读习惯的查询:db.friends.where("lastName").anyOf("Helenius",
Dexie.jsindexedDB 封装器
0
pyopencvOpenCV的Python封装
OpenCV的Python封装,主要特性包括:提供与OpenCV2.x中最新的C++接口极为相似的Python接口,并且包括C++中不包括的C接口提供对OpenCV2.x中所有主要部件的绑定:CxCO
pyopencvOpenCV的Python封装
0
DumboHadoop的Python封装
著名音乐站点Last.fm发布了基于Python的Dumbo(小飞象)项目,Dumbo能够帮助Python开发者更方便的编写Hadoop应用,并且Dumbo为MapReduce应用提供了灵活易用的Py
DumboHadoop的Python封装
0
LuwraLua 的 C++ 封装器
Luwra是一个只包含头文件的C++库,提供了Lua的封装器。该项目要求至少C++14编译器和Lua5.1,但我们推荐最好是Lua5.3或者更新版本。LuaJIT2.0看似也可以工作。
LuwraLua 的 C++ 封装器
0