云物联网API客户端库

google-cloud-iot的Python项目详细描述


alphapypiversionscompat_check_pypicompat_check_github

Cloud IoT API:注册和管理物联网设备 连接到谷歌云平台

快速启动

要使用此库,首先需要执行以下步骤:

  1. Select or create a Cloud Platform project.
  2. Enable billing for your project.
  3. Enable the Cloud IoT API.
  4. Setup Authentication.

安装

使用pip在virtualenv中安装此库。virtualenv是 创建独立的Python环境它解决的基本问题是 依赖项和版本,以及间接权限。

使用virtualenv,无需系统即可安装此库 安装权限,且不会与已安装的系统发生冲突 依赖关系。

支持的python版本

python=3.5

不推荐的python版本

python==2.7。Python2.7支持将于2020年1月1日取消。

Mac/Linux

pip install virtualenv
virtualenv <your-env>
source <your-env>/bin/activate
<your-env>/bin/pip install google-cloud-iot

窗口

pip install virtualenv
virtualenv <your-env>
<your-env>\Scripts\activate
<your-env>\Scripts\pip.exe install google-cloud-iot

预览

devicemanagerclient

fromgoogle.cloudimportiot_v1client=iot_v1.DeviceManagerClient()parent=client.location_path('[PROJECT]','[LOCATION]')# Iterate over all resultsforelementinclient.list_device_registries(parent):# process elementpass# Or iterate over results one page at a timeforpageinclient.list_device_registries(parent).pages:forelementinpage:# process elementpass

下一步

欢迎加入QQ群-->: 979659372 Python中文网_新手群

推荐PyPI第三方库


热门话题
带有服务类安卓的java altbeacon   java在OpenXava免费版本中可以创建多个用户吗?   java如何决定定义变量“private”?   java为什么GetMethodID()对不存在的方法不返回NULL?   java Get JComboBox项字符串表示法   java如何在ifs之间设置限制?   java Android错误:IllegalStateException   JavaSpring4MVC语言环境已更改,但JSP对此没有响应   java Netbeans:如何构建。jar文件随附外部文件。jar库?   Spring Petclinic项目Maven编译时出现java错误   声明Java数组增量元素的快速方法   java无法使用相对xpath找到元素   javascript无法更改标题,也无法在操作栏上显示图标   java标签不是一个接一个地动态创建的   java如何使用ThymeLeaf将对象的属性绑定到隐藏字段?   java从EJB无状态会话bean调用CDI会话范围的生产者方法   java为什么num+=array[i]与for循环中的num=num+array[i]的工作方式不同   使用jsonsimple实现jQuery UI自动完成的java JSON格式   JavaFaceletsUI:重复标记中断JSF表单验证