jucie-python-sdk
项目介绍
果汁云IOT的Python SDK 主项目:https://gitee.com/haonan108/juice-cloud JAVA-SDK:https://gitee.com/haonan108/juice-java-sdk
安装教程
- 安装python环境(>2.6)
- pip install guozhi
使用说明
- 以下可直接连接到guozhiyun平台
from juice.MqttClient import MqttClient
from juice.handler.extend.sensor.SoudSetHandler import SoudSetHandler
from juice.handler.extend.device.TempGetHandler import TempGetHandler
get_handler_dict = {'temp': TempGetHandler()} # 读取设备温度
set_handler_dict = {'soud': SoudSetHandler()} # 设置蜂鸣器(传感器)状态
if __name__ == '__main__':
# 填入产品code、设备code、密钥(需在www.guozhiyun.cn上申请)
mqtt = MqttClient('product_code', 'device_code', 'secret')
mqtt.get_message = get_handler_dict
mqtt.set_message = set_handler_dict
mqtt.init()
- 扩展Handler,需要继承PropGetHandler或PropSetHandler,并实现handle方法,可参考SoudSetHandler,TempGetHandler
Metadata
Release files for guozhi 0.1.6
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 | |
|---|---|---|---|---|
| guozhi-0.1.6.tar.gz | 8.2 kB | Without provenance | Details |
Release files / guozhi-0.1.6.tar.gz
| Download URL | guozhi-0.1.6.tar.gz |
|---|---|
| Size | 8.2 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
cf9f08dfc1df351b6c3aae8fcc5065a4a90034910f8cdc681a711f47dcf3c629
|
|
BLAKE2b-256 checksum How to use checksums |
422a952ba9bd9eac6a88c59acbdd8bc66347b25b739cac9219d2168c19c63811
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/1.13.0 pkginfo/1.5.0.1 requests/2.6.0 setuptools/41.0.1 requests-toolbelt/0.9.1 tqdm/4.32.1 CPython/2.7.5
|
Security for guozhi 0.1.6
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.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A 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.