Skip to content

Instantly share code, notes, and snippets.

View abhishekzgithub's full-sized avatar
🎯
Focusing

Abhishek kumar abhishekzgithub

🎯
Focusing
View GitHub Profile
@abhishekzgithub
abhishekzgithub / producer_iothub_mqtt.py
Created March 22, 2021 07:26
Code to send data from device to iothub using paho-mqtt in python
import json
import ssl
from time import time
from time import sleep
from base64 import b64encode, b64decode
from hashlib import sha256
from urllib import parse
from hmac import HMAC
from paho.mqtt import client as mqtt
from constants import iot_data