myshinjio / ifra-python-sdk

Python SDK for IoT device to work with IFRA IoT Platform

Home Page:https://ifra.io

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

ifra-python-sdk

Install Package with pip

pip install ifra-sdk

Example Code

import ifra_sdk.client as ifra
import time


# Create new client
client = ifra.IfraSDK("<CHANNEL>","<DEVICE_ID>","<DEVICE_SECRET>")

counter=0
while True:
    
    #Append counter sensor
    client.addSensor("counter",'times', counter)

    #Send data
    client.send()

    #Sleep 1 sec
    time.sleep(1)  

    #Increase counter +1
    counter=counter+1

About

Python SDK for IoT device to work with IFRA IoT Platform

https://ifra.io


Languages

Language:Python 94.3%Language:Makefile 5.7%